Context menu: Disabled
A disabled <ContextMenu /> gives the area back to the browser’s own menu. Disabled items stay visible but are skipped by the keyboard.
Disabled menu
Disabled items
This adds the example as components/examples/context-menu/disabled.tsx, together with the Context menu component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/context-menu-disabled.jsonTo add only the component, follow the Context menu installation.
Props in this example
The Context menu props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
disabledShows the browser’s native menu instead. | boolean | false |
| Prop | Type | Default |
|---|---|---|
variant | "default" | "destructive" | "default" |
disabled | boolean | false |
Every prop is in the Context menu API reference.
- File list
- Controlled
- Hold feedback
- Long content
- Nested submenus
- Inside a sheet
- Render as another element
- Right to left
See them all, with keyboard support and accessibility notes, on the Context 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.
- 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.
- Dropdown menuA menu of actions and options behind a button, with groups, submenus, checkbox and radio items, and shortcuts.
- Hover cardA preview card that opens when a link is hovered or focused, for content sighted users can glance at.