Context menu: Right to left
The menu reads the trigger’s direction, so submenus open to the left and arrow keys flip.
انقر بزر الفأرة الأيمن هنا
This adds the example as components/examples/context-menu/rtl.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-rtl.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 |
|---|---|---|
variant | "default" | "destructive" | "default" |
| Prop | Type | Default |
|---|---|---|
defaultChecked | boolean | false |
Every prop is in the Context menu API reference.
- File list
- Controlled
- Disabled
- Hold feedback
- Long content
- Nested submenus
- Inside a sheet
- Render as another element
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.