Skip to main content

Menubar

A row of menus, as in desktop apps.

Left out of Multi-brand Menubar suits dense desktop tools, not website navigation or phones. Brand sites use navigation-menu, and customers sign up on phones. Use instead: Navigation menu, Dropdown menu

See it live​

Start Storybook to see it live: npm run storybook

When to use it​

  • Use it when: A dense desktop-style tool with many commands grouped by menu.
  • Not when: Website navigation (navigation menu), or phones.

Instead:

Words​

  • Shared structure: object, state, next step.
  • Brand tone lives in headlines and marketing copy, not in errors.
  • Errors and confirmations read the same in every brand.
  • Use: Get started, Plan, Order. Avoid: Brand-specific words in errors, Jargon.

The labels components use, from the voice tokens:

  • content.action.commit: Save
  • content.action.cancel: Cancel
  • content.action.destroy: Remove
  • content.action.retry: Try again
  • content.action.empty-action: Get started

See Voice and tone for the whole voice.

Accessibility and keyboard​

KeyboardWhat happensNot
undefinedArrow keys move between and within menus; Escape closes.undefined

Use it in code​

npx open-ds add menubar

The component reads only component keys and semantic tokens, so it follows the brand and mode on <html>.

Tokens it reads​

Menubar reads 78 tokens of its own, each an alias of a semantic token. Each row is one part: its own token, the semantic it aliases, and the value it ends at. Change a semantic and every component that reads it follows; override one of Menubar's tokens to change Menubar alone.

Changes with theme

Multi-brand decides what changes when you switch theme. Here a switch changes colors, type and shape, so the marked rows differ between its brands and between light and dark; everything else holds steady.

PartIts token and the semantic it aliasesValue
Shared
Transition panels durationcomponent.transition.panels-durationmotion.duration.panelsvar(--transition-panels-duration)duration.relaxed:320ms
Menubar
Gapcomponent.menubar.gapspace.gap.tightvar(--menubar-gap)space.8:0.5rem
Corner
Changes with theme
component.menubar.radiusradius.controlvar(--menubar-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.12:0.75remBirch Darkradius.12:0.75remCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Fill
Changes with theme
component.menubar.backgroundcolor.surface.canvasvar(--menubar-background)Aster Lightslate-deep.light.50:#F8FAFCAster Darkslate-deep.dark.0:#020617Birch Lightslate-deep.light.50:#F8FAFCBirch Darkslate-deep.dark.0:#020617Coral Lightslate-deep.light.50:#F8FAFCCoral Darkslate-deep.dark.0:#020617
Paddingcomponent.menubar.paddingcomponent-spacing-map.x1var(--menubar-padding)space.4:0.25rem
Shadow
Changes with theme
component.menubar.shadowelevation.cardvar(--menubar-shadow)Aster Lightshadow.cardAster Darkshadow.card-darkBirch Lightshadow.cardBirch Darkshadow.card-darkCoral Lightshadow.cardCoral Darkshadow.card-dark
Icon sizecomponent.menubar.icon-sizesize.iconvar(--menubar-icon-size)size.16:1rem
Heightcomponent.menubar.heightsize.iconvar(--menubar-height)size.16:1rem
Trigger
Corner
Changes with theme
component.menubar.trigger.radiusradius.badgevar(--menubar-trigger-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Padding, left and rightcomponent.menubar.trigger.padding-xcomponent-spacing-map.x2var(--menubar-trigger-padding-x)space.8:0.5rem
Padding, top and bottomcomponent.menubar.trigger.padding-ycomponent-spacing-map.x1var(--menubar-trigger-padding-y)space.4:0.25rem
Text sizecomponent.menubar.trigger.font-sizetype.body.font-sizevar(--menubar-trigger-font-size)font.size.16:1rem
Weightcomponent.menubar.trigger.font-weighttype.label.font-weightvar(--menubar-trigger-font-weight)font.weight.600:600
Background focus
Changes with theme
on focus
component.menubar.trigger.background-focuscolor.surface.sunkenvar(--menubar-trigger-background-focus)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Label focus
Changes with theme
on focus
component.menubar.trigger.label-focuscolor.text.primaryvar(--menubar-trigger-label-focus)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Background open
Changes with theme
when open
component.menubar.trigger.background-opencolor.surface.sunkenvar(--menubar-trigger-background-open)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Label open
Changes with theme
when open
component.menubar.trigger.label-opencolor.text.primaryvar(--menubar-trigger-label-open)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Content
Corner
Changes with theme
component.menubar.content.radiusradius.controlvar(--menubar-content-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.12:0.75remBirch Darkradius.12:0.75remCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Fill
Changes with theme
component.menubar.content.backgroundcolor.surface.raisedvar(--menubar-content-background)Aster Lightslate-deep.light.0:#FFFFFFAster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.0:#FFFFFFBirch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.0:#FFFFFFCoral Darkslate-deep.dark.100:#1E293B
Paddingcomponent.menubar.content.paddingcomponent-spacing-map.x1var(--menubar-content-padding)space.4:0.25rem
Text
Changes with theme
component.menubar.content.labelcolor.text.primaryvar(--menubar-content-label)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Shadow
Changes with theme
component.menubar.content.shadowelevation.overlayvar(--menubar-content-shadow)Aster Lightshadow.overlayAster Darkshadow.overlay-darkBirch Lightshadow.overlayBirch Darkshadow.overlay-darkCoral Lightshadow.overlayCoral Darkshadow.overlay-dark
Item
Gapcomponent.menubar.item.gapspace.gap.defaultvar(--menubar-item-gap)space.12:0.75rem
Corner
Changes with theme
component.menubar.item.radiusradius.badgevar(--menubar-item-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Padding, left and rightcomponent.menubar.item.padding-xcomponent-spacing-map.x2var(--menubar-item-padding-x)space.8:0.5rem
Padding, top and bottomcomponent.menubar.item.padding-ycomponent-spacing-map.x2var(--menubar-item-padding-y)space.8:0.5rem
Text sizecomponent.menubar.item.font-sizetype.body.font-sizevar(--menubar-item-font-size)font.size.16:1rem
Background focus
Changes with theme
on focus
component.menubar.item.background-focuscolor.surface.sunkenvar(--menubar-item-background-focus)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Label focus
Changes with theme
on focus
component.menubar.item.label-focuscolor.text.primaryvar(--menubar-item-label-focus)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Disabled opacity disabled
when disabled
component.menubar.item.disabled-opacity-disabledopacity.disabledvar(--menubar-item-disabled-opacity-disabled)opacity.40:0.4
Padding leftcomponent.menubar.item.padding-leftcomponent-spacing-map.x8var(--menubar-item-padding-left)space.48:3rem
Text
Changes with theme
destructive
component.menubar.item.labelcolor.status.dangervar(--menubar-item-label)Aster Lightred.light.600:#C42B2BAster Darkred.dark.600:#F28B8BBirch Lightred.light.600:#C42B2BBirch Darkred.dark.600:#F28B8BCoral Lightred.light.600:#C42B2BCoral Darkred.dark.600:#F28B8B
Background focus 2
Changes with theme
destructive, on focus
component.menubar.item.background-focus-2color.status.dangervar(--menubar-item-background-focus-2)Aster Lightred.light.600:#C42B2BAster Darkred.dark.600:#F28B8BBirch Lightred.light.600:#C42B2BBirch Darkred.dark.600:#F28B8BCoral Lightred.light.600:#C42B2BCoral Darkred.dark.600:#F28B8B
Label focus 2
Changes with theme
destructive, on focus
component.menubar.item.label-focus-2color.status.dangervar(--menubar-item-label-focus-2)Aster Lightred.light.600:#C42B2BAster Darkred.dark.600:#F28B8BBirch Lightred.light.600:#C42B2BBirch Darkred.dark.600:#F28B8BCoral Lightred.light.600:#C42B2BCoral Darkred.dark.600:#F28B8B
Icon sizecomponent.menubar.item.icon-sizesize.iconvar(--menubar-item-icon-size)size.16:1rem
Label 2
Changes with theme
component.menubar.item.label-2color.text.mutedvar(--menubar-item-label-2)Aster Lightslate-deep.light.600:#4B5A6FAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.600:#4B5A6FBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.600:#4B5A6FCoral Darkslate-deep.dark.400:#96A3B5
Checkbox
Item gapcomponent.menubar.checkbox.item.gapspace.gap.defaultvar(--menubar-checkbox-item-gap)space.12:0.75rem
Item radius
Changes with theme
component.menubar.checkbox.item.radiusradius.badgevar(--menubar-checkbox-item-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Item padding ycomponent.menubar.checkbox.item.padding-ycomponent-spacing-map.x2var(--menubar-checkbox-item-padding-y)space.8:0.5rem
Item padding rightcomponent.menubar.checkbox.item.padding-rightcomponent-spacing-map.x2var(--menubar-checkbox-item-padding-right)space.8:0.5rem
Item padding leftcomponent.menubar.checkbox.item.padding-leftcomponent-spacing-map.x8var(--menubar-checkbox-item-padding-left)space.48:3rem
Item font sizecomponent.menubar.checkbox.item.font-sizetype.body.font-sizevar(--menubar-checkbox-item-font-size)font.size.16:1rem
Item background focus
Changes with theme
on focus
component.menubar.checkbox.item.background-focuscolor.surface.sunkenvar(--menubar-checkbox-item-background-focus)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Item label focus
Changes with theme
on focus
component.menubar.checkbox.item.label-focuscolor.text.primaryvar(--menubar-checkbox-item-label-focus)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Item disabled opacity disabled
when disabled
component.menubar.checkbox.item.disabled-opacity-disabledopacity.disabledvar(--menubar-checkbox-item-disabled-opacity-disabled)opacity.40:0.4
Item icon sizecomponent.menubar.checkbox.item.icon-sizesize.iconvar(--menubar-checkbox-item-icon-size)size.16:1rem
Radio
Item gapcomponent.menubar.radio.item.gapspace.gap.defaultvar(--menubar-radio-item-gap)space.12:0.75rem
Item radius
Changes with theme
component.menubar.radio.item.radiusradius.badgevar(--menubar-radio-item-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Item padding ycomponent.menubar.radio.item.padding-ycomponent-spacing-map.x2var(--menubar-radio-item-padding-y)space.8:0.5rem
Item padding rightcomponent.menubar.radio.item.padding-rightcomponent-spacing-map.x2var(--menubar-radio-item-padding-right)space.8:0.5rem
Item padding leftcomponent.menubar.radio.item.padding-leftcomponent-spacing-map.x8var(--menubar-radio-item-padding-left)space.48:3rem
Item font sizecomponent.menubar.radio.item.font-sizetype.body.font-sizevar(--menubar-radio-item-font-size)font.size.16:1rem
Item background focus
Changes with theme
on focus
component.menubar.radio.item.background-focuscolor.surface.sunkenvar(--menubar-radio-item-background-focus)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Item label focus
Changes with theme
on focus
component.menubar.radio.item.label-focuscolor.text.primaryvar(--menubar-radio-item-label-focus)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Item disabled opacity disabled
when disabled
component.menubar.radio.item.disabled-opacity-disabledopacity.disabledvar(--menubar-radio-item-disabled-opacity-disabled)opacity.40:0.4
Item icon sizecomponent.menubar.radio.item.icon-sizesize.iconvar(--menubar-radio-item-icon-size)size.16:1rem
Text
Padding, left and rightcomponent.menubar.label.padding-xcomponent-spacing-map.x2var(--menubar-label-padding-x)space.8:0.5rem
Padding, top and bottomcomponent.menubar.label.padding-ycomponent-spacing-map.x2var(--menubar-label-padding-y)space.8:0.5rem
Text sizecomponent.menubar.label.font-sizetype.body.font-sizevar(--menubar-label-font-size)font.size.16:1rem
Weightcomponent.menubar.label.font-weighttype.label.font-weightvar(--menubar-label-font-weight)font.weight.600:600
Padding leftcomponent.menubar.label.padding-leftcomponent-spacing-map.x8var(--menubar-label-padding-left)space.48:3rem
Separator
Fill
Changes with theme
component.menubar.separator.backgroundcolor.border.defaultvar(--menubar-separator-background)Aster Lightslate-deep.light.200:#E2E8F0Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.200:#E2E8F0Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.200:#E2E8F0Coral Darkslate-deep.dark.100:#1E293B
Shortcut
Text sizecomponent.menubar.shortcut.font-sizetype.caption.font-sizevar(--menubar-shortcut-font-size)font.size.13:0.8125rem
Text
Changes with theme
component.menubar.shortcut.labelcolor.text.mutedvar(--menubar-shortcut-label)Aster Lightslate-deep.light.600:#4B5A6FAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.600:#4B5A6FBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.600:#4B5A6FCoral Darkslate-deep.dark.400:#96A3B5
Sub
Trigger radius
Changes with theme
component.menubar.sub.trigger.radiusradius.badgevar(--menubar-sub-trigger-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Trigger padding xcomponent.menubar.sub.trigger.padding-xcomponent-spacing-map.x2var(--menubar-sub-trigger-padding-x)space.8:0.5rem
Trigger padding ycomponent.menubar.sub.trigger.padding-ycomponent-spacing-map.x2var(--menubar-sub-trigger-padding-y)space.8:0.5rem
Trigger font sizecomponent.menubar.sub.trigger.font-sizetype.body.font-sizevar(--menubar-sub-trigger-font-size)font.size.16:1rem
Trigger background focus
Changes with theme
on focus
component.menubar.sub.trigger.background-focuscolor.surface.sunkenvar(--menubar-sub-trigger-background-focus)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Trigger label focus
Changes with theme
on focus
component.menubar.sub.trigger.label-focuscolor.text.primaryvar(--menubar-sub-trigger-label-focus)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Trigger padding leftcomponent.menubar.sub.trigger.padding-leftcomponent-spacing-map.x8var(--menubar-sub-trigger-padding-left)space.48:3rem
Trigger background open
Changes with theme
when open
component.menubar.sub.trigger.background-opencolor.surface.sunkenvar(--menubar-sub-trigger-background-open)Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B
Trigger label open
Changes with theme
when open
component.menubar.sub.trigger.label-opencolor.text.primaryvar(--menubar-sub-trigger-label-open)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Content radius
Changes with theme
component.menubar.sub.content.radiusradius.controlvar(--menubar-sub-content-radius)Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.12:0.75remBirch Darkradius.12:0.75remCoral Lightradius.999:9999pxCoral Darkradius.999:9999px
Content background
Changes with theme
component.menubar.sub.content.backgroundcolor.surface.raisedvar(--menubar-sub-content-background)Aster Lightslate-deep.light.0:#FFFFFFAster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.0:#FFFFFFBirch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.0:#FFFFFFCoral Darkslate-deep.dark.100:#1E293B
Content paddingcomponent.menubar.sub.content.paddingcomponent-spacing-map.x1var(--menubar-sub-content-padding)space.4:0.25rem
Content label
Changes with theme
component.menubar.sub.content.labelcolor.text.primaryvar(--menubar-sub-content-label)Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC
Content shadow
Changes with theme
component.menubar.sub.content.shadowelevation.overlayvar(--menubar-sub-content-shadow)Aster Lightshadow.overlay:0px 12px 32px 0px #0F172A29Aster Darkshadow.overlay-dark:0px 12px 32px 0px #00000080Birch Lightshadow.overlay:0px 12px 32px 0px #0F172A29Birch Darkshadow.overlay-dark:0px 12px 32px 0px #00000080Coral Lightshadow.overlay:0px 12px 32px 0px #0F172A29Coral Darkshadow.overlay-dark:0px 12px 32px 0px #00000080
From the system
Edge
Changes with theme
color.border.default
straight from the system, through --border
Aster Lightslate-deep.light.200 · #E2E8F0Aster Darkslate-deep.dark.100 · #1E293BBirch Lightslate-deep.light.200 · #E2E8F0Birch Darkslate-deep.dark.100 · #1E293BCoral Lightslate-deep.light.200 · #E2E8F0Coral Darkslate-deep.dark.100 · #1E293B