Hold to confirm
Confirm a destructive action by holding, not tapping.
Reveal row actions with a swipe, or from the same actions in a menu.
npx shadcn@latest add @silicon-ui/swipe-actionsnpx shadcn@latest add @silicon-ui/swipe-actionsInstall the dependencies.
npm install @radix-ui/react-dropdown-menu lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/swipe-actions/swipe-actions.tsxcomponents/silicon-ui/swipe-actions/swipe-actions.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
SwipeActions| Prop | Type | Default |
|---|---|---|
label* | string | — |
children* | ReactNode | — |
className | string | — |
SwipeActionsRow| Prop | Type | Default |
|---|---|---|
label*Names the row in its menu button, for example the message subject. | string | — |
children* | ReactNode | — |
leading | SwipeAction[] | [] |
trailing | SwipeAction[] | [] |
fullSwipeLets a long swipe commit the outermost action without a tap. On by default. | boolean | true |
className | string | — |