Dropdown menu
A React component in Beamline's Overlays category, in the free sample.
A list of actions behind a trigger, with shortcuts, check items, headings and submenus; one highlight glides under the pointer and jumps with the keyboard.
Use it for
- Row actions, More menus, account menus, Move to…
Not for
- Choosing a form value (select).
- App-wide search and commands (command-menu).
- Right-click menus (context-menu).
Anatomy
- trigger (built-in Button, or your own)
- surface
- highlight plate
- item (icon, label, shortcut)
- check item
- heading
- separator
- submenu
Variants
- trigger: text, icon only, custom
- tone: default, danger
States
- closed
- open
- item highlighted
- item disabled
- check item on/off
- submenu open
Keyboard
- Enter / Space / ↓ opens
- ↑ ↓ move, wrapping
- → opens a submenu, ← closes it
- type a letter to jump
- Escape closes and returns focus
Motion
The surface grows from the trigger; one highlight plate glides between rows for the pointer and the arrow keys alike (--pui-duration-fast) and appears in place the first time. Every row acknowledges a press at once (a tint over the plate) before the menu closes or the row toggles; a check grows into its row as the value changes (--pui-motion-in). The surface is never wider or taller than the room beside its trigger. Reduced motion places it at once and fades the surface.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | The menu's name: the trigger's text, or its accessible name when the trigger is an icon. |
items | MenuItem[] | — | Items rendered in the component. Required. |
icon | ReactNode | — | An icon for the built-in trigger (MoreHorizontal for row actions); with it the trigger shows only the icon, and label becomes its accessible name, unless showLabel is set. |
trigger | ReactElement | — | Your own trigger (a Button, an avatar); it receives the open state and keyboard handling. |
variant / size | ButtonVariant / ButtonSize | "ghost" / "sm" | variant: Visual weight of the control. Defaults to "ghost". size: Control size within the supported size steps. Defaults to "sm". |
align / side | string | "end" / "bottom" | align: Alignment within the available space. Defaults to "end". side: Edge from which the panel or anchored content opens. Defaults to "bottom". |
MenuItem | { label, icon?, shortcut?, onSelect?, disabled?, tone?: "danger", separatorBefore?, heading?, checked?, items? } | — | One row of any menu in the system (dropdown, context menu, menu bar). The same data renders the same everywhere. |
open / defaultOpen / onOpenChange | boolean | — | open: Controlled open state; omit to use defaultOpen. defaultOpen: Initial open state when uncontrolled. Defaults to false. onOpenChange: Reports open state after a change; no callback by default. |
classNames | MenuClassNames | — | Classes for the named visual parts; no part overrides by default. |
style / ref | CSSProperties / native Ref | — | style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default. |
showLabel | boolean | — | Shows the label beside the icon. Defaults to false. |
variant | ButtonVariant | — | Visual weight of the control. Defaults to "ghost". |
size | ButtonSize | — | Control size within the supported size steps. Defaults to "sm". |
align | "center" | "end" | "start" | — | Alignment within the available space. Defaults to "end". |
side | "bottom" | "left" | "right" | "top" | — | Edge from which the panel or anchored content opens. Defaults to "bottom". |
open | boolean | — | Controlled open state; omit to use defaultOpen. |
defaultOpen | boolean | — | Initial open state when uncontrolled. Defaults to false. |
onOpenChange | ((open: boolean) => void) | — | Reports open state after a change; no callback by default. |
className | string | — | Classes on the documented visual root; no override by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented root element; no ref by default. |
dir | "ltr" | "rtl" | — | Reading direction; inherits the surrounding direction when omitted. Defaults to the surrounding reading direction. |
Built from
Used in
- Accounting workbench
- Action center
- Admin users
- Agent builder
- Agent runs monitor
- AI agent workspace
- Analytics dashboard
- API keys & webhooks
- Applicant company
- Applicant projects
- Artifact workbench
- Asset library
- Asset packs
- Audience segments
- Audit log
- Automation steps
- Billing & invoices
- Billing desk
- Services and hours
- Budget month
- Bulk item edit
- Call sheet
- Captions
- Care plan
- Case workspace
- Category manager
- Change orders
- Changelog feed
- Insurance claims
- Collection batch edit
- Company access
- Component properties
- Condition checklist
- Contact profile
- Content releases
- Conversation history
- Course builder
- Course dashboard
- Course home
- CRM pipeline
- Cut review
- Cycle planner
- Dashboard controls
- Dashboard panels
- Data binding
- Day agenda
- Design inputs
- Document finder
- Document history
- Document review
- Draft orders
- Drawing board
- Electrical design
- Email automation
- Engineering changes
- Equipment register
- Estimate share
- External review
- Field conditions
- File manager
- Flight logbook
- Flight route
- Gift batches
- Grading desk
- Helpdesk inbox
- Hiring pipeline
- Inspection review
- Instrument use
- Intake triage
- Integrations
- Inventory finder
- Inventory item
- Invoices
- Job booking setup
- Knowledge base manager
- Lease renewals
- Link booking
- Map annotations
- Map explorer
- Market screener
- Meeting and call review
- Messaging journeys
- Metadata fields
- Newsletter desk
- Notification preferences
- Nutrition library
- Order changes
- Order composer
- Order detail
- Order history and fills
- Orders admin
- Owner records
- Page header
- Parcel record
- Parts tracker
- Payroll approvals
- Payroll cycles
- Permit record
- Pipeline record
- Pipeline views
- Plan acceptance
- Plan comparison
- Plan follow-up
- Plan readiness
- Plan templates
- Planner setup
- Policy rules
- Portfolio overview
- Post performance
- Pre-flight briefing
- Product analytics
- Product editor
- Production and lots
- Program modules
- Program setup
- Project board
- Projects
- Proposal payments
- Prototype review
- Prototype task
- Purchase order desk
- Purchase request
- Quality checks
- Query library
- Question builder
- Queue settings
- Record settings
- Record setup
- Record versions
- Recruiter home
- Rental policy
- Report builder
- Report library
- Rooms & equipment
- Retention analysis
- Return case
- Return queue
- Review page builder
- Review share
- Roles & permissions
- Roof layout
- Route plan
- Sales dashboard
- Sample ledger
- Saved views
- Screenplay revisions
- Service estimate
- Service tasks
- Session notes and tasks
- Session replay
- Settings
- Shared inbox
- Shift briefing
- Shot list
- Signing request
- Slot editor
- Social media scheduler
- Solar quote
- Sound library
- Stage reports
- Status dashboard
- Stock moves
- Stop runs
- Study setup
- Submittal register
- AI support chat
- AI support console
- Table service
- Team & members
- Telemetry explorer
- Ticket setup
- Tracker desk
- Trading terminal
- Training progress
- Transaction review
- Translation editor
- Treatment plan
- Tree test
- Versioned dashboard
- Versioned document
- Voice agent
- Waitlist desk
- Workflow builder
- Workflow composer
- Workout logger
- Workout planner
- Writing canvas
Dependencies
@radix-ui/react-dropdown-menu, lucide-react
Import
import { DropdownMenu } from "@beamline/dropdown-menu";
Get it
Dropdown menu is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Dropdown menu is included in the free MIT sample. Get Beamline · Connect your agent
More in Overlays
- Command menu: Search-first list of every action: ranked matching, groups, keycap shortcuts and nested pages; inline as CommandPalette or in a ⌘K dialog as CommandMenu.
- Toast: Short results of an action stacked at an edge: point at the stack to fan it out and pause the timers; undo or retry in place; Alt+T, Escape and a swipe…
- Share dialog: Share a document, board or project: invite people by name or email with the access they get, change or remove anyone's access in place, and set who the…
- Context menu: Actions for an object on right-click, long-press, Shift+F10 or the menu key, opened at the pointer, with the same rows as the dropdown menu.
- Hover card: A preview of a person, link or record on hover or keyboard focus, without leaving the page; HoverCardProfile is the standard person preview.
- Product tour: A short guided tour over the real interface: a spotlight that glides from one element to the next while the rest of the screen dims, and a card beside…
- Bottom sheet: A phone panel that rests at a peek and follows the finger to full height; a flick down closes it, and the handle works from the keyboard.
- Sheet: A panel that slides in from an edge with the page still visible behind it: header and footer stay put while the body scrolls.
- Dialog: A focused task over the page (create, invite, rename) with a title, body and footer; focus moves in, is trapped and returns on close.
- Alert Dialog: A blocking confirmation that must be answered: the scrim does not dismiss it, focus starts on the safe choice, and an async action keeps it open until…
- Popover: A small surface anchored to a trigger for a short form, a filter or an explanation; focus moves in and returns on close.
- Tooltip: Short supporting text for a control: opens after a moment on hover and at once on keyboard focus; inside a toolbar group the next one opens instantly.