ContextMenu
ContextMenu shows actions for a target on right-click or long-press.
Source
LLM docs
Package
Examples
1
Properties
38
Playground
Basics
Wrap any trigger element with
ContextMenu and pass an items array. The menu opens on right-click (web) or long-press (mobile); the children render prop receives the handlers to spread onto your trigger.Loading demo…
import { Card, ContextMenu, Text } from '@plocks/ui';
const ITEMS = [
{ id: 'copy', label: 'Copy' },
{ id: 'rename', label: 'Rename' },
{ id: 'delete', label: 'Delete', danger: true },
];
export function Demo() {
return (
<ContextMenu items={ITEMS}>
{(triggerProps) => (
<Card {...triggerProps} padding="2xl">
<Text>Right-click or long-press me</Text>
</Card>
)}
</ContextMenu>
);
}React Native design for iOS, Android, and Web.
Quick Links
Resources