Hold to Confirm

Press and hold: a ring fills, the button compresses, release drains it, completion bursts.

  • Zero dependencies
  • React + Tailwind
  • Accessible
  • Reduced-motion aware
Open in v0

Preview

Animated · Full motion: idle animation, physics and effects. animated (default)

A deliberate-action button for publishing, payments or deletions. The fill rate and drain rate differ so it feels like pressure building and leaking.

Installation

$ npx shadcn@latest add https://pickui.guetix.com/r/hold-to-confirm.json

Uses the shadcn CLI. It creates components/pickui/hold-to-confirm.tsx and installs nothing else.

Usage

example.tsx
import { HoldToConfirm } from "@/components/pickui/hold-to-confirm";

export default function Example() {
  return <HoldToConfirm />;
}
PublishIrreversible actionsGames

Props

PropTypeDefaultDescription
labelstring—Button label.
durationnumber1400Hold time (ms).
onConfirm() => void—Fired when complete.
colorstring"#4ade80"Ring color.
animatedbooleantruefalse = the calm “Regular” version (no idle or ambient motion).

Accessibility

  • Space / Enter can be held; label says 'press and hold'.