Hold to confirm
A press-and-hold button that wipes a destructive fill across the label as you confirm.
API reference
Components
<HoldToConfirmButton />
Destructive hold button with left-to-right fill wipe.
holdSeconds?
Seconds to hold. Default 2.
mode?
Post-confirmation behaviour. Default "callback".
successLabel?
Label in "success" mode. Default "Confirmed".
onConfirm?
Fired when the hold completes.
onCancel?
Fired when the hold is released early.
children?
Button label, rendered in both progress layers.
className?
Merged onto the button.
"aria-describedby"?
Wired to aria-describedby.
Hooks
useHoldToConfirm
Headless press-and-hold gesture with a progress MotionValue.
useHoldToConfirm(options: UseHoldToConfirmOptions): UseHoldToConfirmResultholdSeconds?
Seconds to hold for confirmation. Default 2.
onConfirm?
Fired when a hold completes.
onCancel?
Fired when a hold is released early.
Returns
progress
0 at rest, 1 confirmed.
reset
Snap progress back to 0 and clear the completed lock.
holdHandlers
Spread onto the interactive element.
Featured in
See the hold to confirm composed into full sections.

