DropdownMenu

Storybook

A click-triggered floating menu with keyboard navigation, typeahead, checkbox/radio items, and ARIA menu semantics.

Basic

A simple menu with items. Click the trigger or press Enter/ArrowDown to open. Arrow keys navigate, Enter/Space activate, Escape closes.

Complex with Sub-menus

Nested sub-menus open on hover or ArrowRight. ArrowLeft closes the sub-menu. Mirrors the shadcn "complex" example.

With Shortcuts

Items with keyboard shortcut hints displayed on the right.

Checkbox Items

Toggleable items with server-driven checked state. Menu stays open on toggle.

Server state: status_bar=true, activity_bar=false, panel=true

Radio Group

Single-selection items via radio group and radio items.

Server state: theme=system

With Icons

Items with leading icons.

Destructive Item

Use variant="destructive" for dangerous actions.

Disabled Items

Disabled items are visually dimmed and skipped by keyboard navigation.

Placement

Different side and align combinations. The menu flips if there isn't enough space.

Server-controlled

Server controls open/close state. Uses the :if + show pattern.

Server state: show=false, action=nil