easeUI
1

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

API reference

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

Updated