Component packs › Threshold › Hold-to-delete Confirm
The confirm grows out of the row's bin button; holding fills it and deletes, letting go early drains it, then the row closes up with Undo.
Hold-to-delete Confirm is a confirm from Threshold, a component pack with 6 overlays: Dialogs, drawers and sheets that come out of where you tapped and go back into it. Price: $2 for the whole pack.
Built with: popover from the bin, hold, never a click, undo bar.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
files | { name: string; meta: string }[] | ||
hold | number | How long to hold, in ms. | |
onDelete | (name: string) => void | ||
onUndo | (name: string) => void | ||
fixed | boolean | ||
theme | "light" | "dark" | ||
autoplay | number | false | Showcase mode: opens a confirm and holds it every N ms while visible. |
destroy(): voidimport HoldConfirm from './HoldConfirm';
<HoldConfirm />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Dialogs and drawers.