Dropdown menu
A focused list of actions anchored to a trigger.
Secondary actions kept close to the selected object.
npx shadcn@latest add @silicon-ui/context-menunpx shadcn@latest add @silicon-ui/context-menuInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/context-menu/context-menu.tsxcomponents/silicon-ui/context-menu/context-menu.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
children* | ReactNode | — |
items* | ContextMenuItem[] | — |
label | string | "Context menu" |