Dropdown menu: Checkboxes
<DropdownMenuCheckboxItem /> toggles a setting and keeps the menu open, so several can be changed in a row. The check draws in and out instead of popping.
This adds the example as components/examples/dropdown-menu/checkboxes.tsx, together with the Dropdown menu component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/dropdown-menu-checkboxes.jsonTo add only the component, follow the Dropdown menu installation.
Props in this example
The Dropdown menu props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
render | ReactElement | (props, state) => ReactElement | <button> |
| Prop | Type | Default |
|---|---|---|
checked | boolean | – |
onCheckedChange | (checked: boolean, details) => void | – |
disabled | boolean | false |
Every prop is in the Dropdown menu API reference.
- Safe area
- Radio group
- Check on the right
- Select-like
- Row actions
- Controlled
- Open on hover
- Disabled
- Long content
- Scrolling
- Inside a sheet
- Right to left
See them all, with keyboard support and accessibility notes, on the Dropdown menu page.
- 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.
- DrawerA panel that slides in from any edge and follows your finger, with snap points, a working handle and nested drawers that stack.
- Hover cardA preview card that opens when a link is hovered or focused, for content sighted users can glance at.