Components
ContextMenu
WEB APPROXIMATION — this is the long-press menu.
On iOS it is a native UIContextMenu with a lifted preview of the pressed element and haptic feedback; neither exists on web. Long-press the card below to open the Material fallback, then check the real thing on a simulator.
<View className="items-start">
<ContextMenu {...args}>
<View className="bg-card border-border w-72 gap-1 rounded-xl border p-4">
<Text variant="heading">Item title</Text>
<Text variant="footnote" color="tertiary">
Item title · Detail · Long-press for actions
</Text>
</View>
</ContextMenu>
</View>Import
import { ContextMenu } from '@simal/ui/nativewindui';Props
| Prop | Values | Default | Description |
|---|---|---|---|
items | — | [] | Menu entries. destructive: true colours one red; subMenu nests another level. Order is render order. |
onItemPress | — | — | Fires with the pressed item. Match on actionKey — title is display text and will change. |
children | — | — | The element being long-pressed. On iOS it lifts and blurs its surroundings, so give it a solid background or it will look transparent while open. |
Examples
With Icons
<View className="items-start">
<ContextMenu {...args}>
<View className="bg-card border-border w-72 rounded-xl border p-4">
<Text>Long-press me</Text>
</View>
</ContextMenu>
</View>