Slide to Confirm

The 'slide to unlock' gesture for destructive actions, with a shimmering label and spring-back.

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

Preview

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

Drag the handle all the way to confirm. Releasing early springs back with overshoot; the label shimmers and fades as you slide; completion turns the track red with a check, with Undo.

Installation

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

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

Usage

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

export default function Example() {
  return <SlideToConfirm />;
}
Delete projectTransfer moneyPublish to production

Props

PropTypeDefaultDescription
labelstring—Track label.
doneLabelstring—Completed label.
onConfirm() => void—Fired on completion.
colorstring"#ef4444"Completed color.
animatedbooleantruefalse = the calm “Regular” version (no idle or ambient motion).

Accessibility

  • Handle is role=slider; → / End / Enter confirm from the keyboard.