Skip to main content
v7

Menu

Create context menus, dropdowns, and nested navigation with ease.

Package@g4rcez/componentsSectionFloating Elements

Examples

Nested menus

A menu inside a menu opens to the right, at any depth. Here languages open their frameworks, and frameworks open their tools. Hover opens a level, and ArrowRight and ArrowLeft move between levels from the keyboard.

Languages and frameworks

Icons, shortcuts, groups and checks

Left puts an icon before the label and shortcut shows a key hint at the end of the row (display only, bind the keys yourself). MenuSeparator and MenuLabel group the rows, role menuitemcheckbox and menuitemradio with checked add the indicator column, and tone danger colors a destructive row.

Project stack

Placement

Use side, align and offset to choose where the root menu opens. The defaults are side=bottom, align=start and offset=4. Nested menus always open to the right.

Placement

Custom Trigger and Item Styling

Use any component as the trigger with asChild, and style single rows with classes or with tone.

Custom component item

When to use Menu

Use when

You need the documented Menu interaction or presentation in a product workflow.

Avoid when

A native HTML element already provides the Menu behavior you need.

Accessibility

Keep the Menu labeled and use its documented keyboard interaction. The component preserves visible focus and communicates state without relying on color alone.