easeUI

Hold to Confirm

Button for destructive actions that fills while you hold it and only fires once the fill completes. Letting go early drains it back quickly.

Press and hold to confirm

Let go early to cancel

Installation

$ bunx --bun shadcn add @easeui/hold-to-confirm
In easeUI ProHold ButtonA hold to confirm button in two tones, with a fill that grows behind the label and drains back if you let go.See it

API reference

PropTypeDefaultDescription
onConfirm() => void-Runs once the hold completes.
childrenReactNode-Button label, such as "Hold to delete".
confirmedLabel?anyDoneLabel shown with a check after confirming. Default "Done".
duration?number1500How long to hold, in ms. Default 1500.
disabled?boolean--
className?string--