ContextMenu
ContextMenu presents a menu of actions from a context interaction. On the web this maps to the native right-click gesture while preserving SwiftUI's contextual action model.
ContextMenu presents a menu of actions from a context interaction. On the web this maps to the native right-click gesture while preserving SwiftUI's contextual action model.
Examples
Default
Preview unavailable for this example in the static docs build.
Show code
<ContextMenu
items={[
{ label: 'Rename' },
{ label: 'Duplicate' },
{ label: 'Delete', style: 'destructive' },
]}
>
<Card>
<Text>Right click this card</Text>
</Card>
</ContextMenu>API
| Prop | Type | Required | Description |
|---|---|---|---|
items | IContextMenuItem[] | Yes | Menu items. |
children | ReactElement | Yes | Trigger content that receives the context-menu interaction. |
Inherits additional props from IBaseComponent.
Overview
ContextMenu presents a menu of actions from a context interaction. On the web this maps to the native right-click gesture while preserving SwiftUI's contextual action model.
Notes
- Right click the wrapped content to open the menu.
- The first enabled action receives focus when the menu opens.
- Use ↑/↓ and Home/End to move between actions.
- Items dismiss the menu after selection.
- The menu closes on outside click or
Escape, then restores focus to the trigger.
ContentUnavailableView
ContentUnavailableView presents polished empty states for missing data, search misses, and first-run experiences.
ControlGroup
ControlGroup clusters related actions under a shared label. The component keeps SwiftUI's grouped-control mental model while using standard web grouping semantics.