05 · Hold
Sheet 05 · Components

Hold

People press and hold until the fill completes. Letting go early cancels.

Fig. 03
Press and hold to confirm

Await log waiting for you to try it

Installation
npx shadcn add @sureui/confirm-button
Usage
<ConfirmButton gesture="hold" variant="destructive" onConfirm={revoke}>  Hold to revoke</ConfirmButton>
Props
onConfirm
() => void | Promise<unknown>
Default: required
gesture
"click" | "click-again" | "hold"
Default: "click"
duration
number
Default: 1200, min 800
announcements.hold
string
Default: "Press and hold to confirm"
onCancel
() => void
Default: —
undo
boolean | number
Default: —
...props
Button props
Default: —
data-state
"idle" | "armed" | "holding" | "undo" | "pending"
Default: "idle"
When to use it
Use it when
  • Revoking an API key or resetting preferences.
  • Touch screens, where a second tap happens by accident.
  • The effort should feel deliberate without opening anything.
Reach for something else when
© 2026 SureUI · MIT licensed · Built on shadcn/ui