← ui-lab

Hold Button

A hold-to-confirm button: the action fires only after you press and hold for a moment, and releasing early cancels it — a deliberate, slip-resistant confirmation. Works with the pointer and with Space/Enter held on the keyboard.

Preview

Press and hold to confirm

Installation

npx shadcn@latest add https://ui.publictheta.com/r/hold-button.json

Conformance

This component conforms to the @publictheta/ui-spec hold-button specification. Run the suite against any implementation with pnpm conformance.