Skip to main content

Menu

A dropdown menu triggered by a button click. Supports keyboard navigation, disabled items, and dividers.

Basic Usage

With Disabled Items

Alignment

Mobile variant

By default, Menu renders as a dropdown on every viewport. Set mobileVariant="sheet" and on touch devices (coarse pointer) the menu instead opens as an ActionSheet anchored at the bottom — a much more reachable target for thumb-driven interaction.

<Menu mobileVariant="sheet">
<Menu.Trigger>
<Button variant="outline">Actions</Button>
</Menu.Trigger>
<Menu.Content>
<Menu.Item onClick={share}>Share</Menu.Item>
<Menu.Item onClick={archive}>Archive</Menu.Item>
<Menu.Divider />
<Menu.Item onClick={remove} danger>Delete</Menu.Item>
</Menu.Content>
</Menu>

Desktop layout is unaffected — the dropdown still anchors to the trigger.

Mobile considerations

  • mobileVariant="sheet" is recommended for menus with more than 3 items on mobile — thumb reach to a bottom sheet beats accuracy on a small floating dropdown.
  • All Menu.Items meet the 44px tap target on mobile (vertical padding scales up automatically on coarse pointers).
  • Hover highlight is @media (hover: hover) guarded so taps don't leave items in a stuck-hover state.
PropTypeDefaultDescription
childrenReactNode-Menu children (Trigger, Content)
mobileVariant'dropdown' | 'sheet''dropdown'On touch devices, render as ActionSheet when set to "sheet"
PropTypeDefaultDescription
childrenReactElement-Trigger element
PropTypeDefaultDescription
align'start' | 'end''start'Alignment relative to trigger
childrenReactNode-Content children (Menu.Item, Menu.Divider)
classNamestring-Additional CSS class name
styleCSSProperties-Additional inline styles
PropTypeDefaultDescription
onClick() => void-Click handler
disabledbooleanfalseWhether the item is disabled
dangerbooleanfalseRender as a destructive action (red)
startIconReactNode-Icon before the label
childrenReactNode-Item content
classNamestring-Additional CSS class name