About
A press-and-hold button for destructive or irreversible actions that fills with a countdown as you hold it down and drains back if released early, instead of interrupting with a confirmation dialog.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Hold to Confirm Button to your project and fits it to your theme.
Code
How Hold to Confirm Button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { HoldToConfirm } from "@/components/ui/hold-to-confirm";
export default function HoldToConfirmDemo() {
return (
<div className="flex min-h-[320px] w-full items-center justify-center bg-background">
<HoldToConfirm
label="Hold to revoke key"
doneLabel="Key revoked"
onConfirm={() => {
console.log("Key revoked");
}}
/>
</div>
);
}
















