Overlays
Context Menu
A menu that appears on right-click. Provides contextual actions relevant to the element under the cursor.
Right-Click Menu
Right-click here
Import
import {
ContextMenu,
ContextMenuContent,
ContextMenuItem,
ContextMenuTrigger,
} from "@mikenotthepope/substrateui"Composition
ContextMenu
├── ContextMenuTrigger
└── ContextMenuContent
└── ContextMenuItemDirection
A submenu opens toward the end of the line, so in RTL it opens leftward and its trigger's ChevronRight should point that way too. The RTL icon audit classifies it flip in RTL; the indicator carries rtl:-scale-x-100 for that reason.
Positioning and padding are logical throughout, so the menu itself needs nothing configured — flip the site's direction and the alignment follows.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
childrenrequired | React.ReactNode | — | The trigger area and menu content. Compose with ContextMenuTrigger and ContextMenuContent. |