Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Menubar

Desktop-style application commands with local feedback.

Preview

Live preview

Changes apply to this preview only.

Nothing selected yet

Open a menu and choose an item: the panel closes, focus returns to the trigger and the chosen command is reported here.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Choose a command and observe the result; unavailable actions remain disabled.

Open preview

Menubar fits a document editor or a desktop-style workspace. Here it shares a header with a primary action.

Open preview

MenubarLabel groups related commands and a disabled trigger remains visible without opening.

Open preview

Usage

Use Menubar for commands, and Navbar or NavigationMenu for destinations.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluMenubarProps

Type source
PimoluMenubarProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
labelstring | undefined"Menu bar"Accessible name of the menubar. Defaults to "Menu bar".
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

label

string | undefined

Default: "Menu bar"

Accessible name of the menubar. Defaults to "Menu bar".

onChange

ChangeEventHandler<HTMLDivElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluMenubarMenuProps

Type source
PimoluMenubarMenuProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
valuestring | undefined—Stable identity of the menu. Omit to let the component generate one. Useful only when the same menu must be addressed programmatically.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

value

string | undefined

No default extracted.

Stable identity of the menu. Omit to let the component generate one. Useful only when the same menu must be addressed programmatically.

PimoluMenubarTriggerProps

Type source
PimoluMenubarTriggerProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
onChangeChangeEventHandler<HTMLButtonElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLButtonElement> | undefined—Standard React/HTML attribute.
disabledboolean | undefined—Standard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
valuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

onChange

ChangeEventHandler<HTMLButtonElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLButtonElement> | undefined

No default extracted.

Standard React/HTML attribute.

disabled

boolean | undefined

No default extracted.

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

value

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

PimoluMenubarContentProps

Type source
PimoluMenubarContentProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
sideOffsetnumber | undefined4Distance from the trigger. Defaults to 4.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

sideOffset

number | undefined

Default: 4

Distance from the trigger. Defaults to 4.

onChange

ChangeEventHandler<HTMLDivElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluMenubarItemProps

Type source
PimoluMenubarItemProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
onSelect(() => void) | undefined—Runs before the menu closes and returns focus to its trigger.
onChangeChangeEventHandler<HTMLButtonElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLButtonElement> | undefined—Standard React/HTML attribute.
disabledboolean | undefined—Standard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
valuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

onSelect

(() => void) | undefined

No default extracted.

Runs before the menu closes and returns focus to its trigger.

onChange

ChangeEventHandler<HTMLButtonElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLButtonElement> | undefined

No default extracted.

Standard React/HTML attribute.

disabled

boolean | undefined

No default extracted.

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

value

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

PimoluMenubarSeparatorProps

Type source
PimoluMenubarSeparatorProps public API
NameTypeDefaultDescription
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluMenubarLabelProps

Type source
PimoluMenubarLabelProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Verify arrow navigation, disabled-item skipping, Escape and focus return at a scrolled position.
Read the accessibility guide →