Component packs › Threshold › Hold-to-delete Confirm

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.

Hold-to-delete Confirm props

PropTypeDefaultDescription
files{ name: string; meta: string }[]
holdnumberHow long to hold, in ms.
onDelete(name: string) => void
onUndo(name: string) => void
fixedboolean
theme"light" | "dark"
autoplaynumber | falseShowcase mode: opens a confirm and holds it every N ms while visible.

Methods on the ref

Use it in React

import HoldConfirm from './HoldConfirm';

<HoldConfirm />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Threshold

Good for: Dialogs and drawers.