Menubar: Trigger icons
Put an icon before a trigger's label, or use an icon on its own with an aria-label. Icon-only triggers get a square shape.
This adds the example as components/examples/menubar/trigger-icons.tsx, together with the Menubar component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/menubar-trigger-icons.jsonTo add only the component, follow the Menubar installation.
Props in this example
The Menubar props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
align | "start" | "center" | "end" | "start" |
Every prop is in the Menubar API reference.
See them all, with keyboard support and accessibility notes, on the Menubar page.
- Dropdown menuA menu of actions and options behind a button, with groups, submenus, checkbox and radio items, and shortcuts.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- Alert dialogA confirmation dialog for destructive or important actions that waits for async work, and becomes a bottom sheet on phones.
- CommandA searchable list of actions, inline or as a ⌘K palette, with pages, shortcuts and highlighted matches.
- Context menuA menu of actions on right click or long press, with submenus, checkbox and radio items, and hold feedback on touch.
- DialogA window over the page for forms and focused tasks, with a pinned header and footer, nesting, and a swipeable bottom sheet on phones.