Slide to Confirm
Slide to Confirm: Drag the knob across the track to commit an action — snaps back if you release early, locks green when confirmed. Great for irreversible or high-intent actions. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Slide to Confirm
npx motion-ui-skill add slide-to-confirm-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxlucide-reactreacttailwind-merge
Source files
Slide to Confirm
Drag the knob across the track to commit an action — snaps back if you release early, locks green when confirmed. Great for irreversible or high-intent actions.
Install
npx motion-ui-skill add slide-to-confirm-button
Dependencies
clsxlucide-reactreacttailwind-merge
Usage
"use client";
import { SlideToConfirmButton } from "@/components/buttons/slide-to-confirm-button";
export function SlideToConfirmButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<SlideToConfirmButton />
</div>
);
}
API Reference
SlideToConfirmButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
className |
string |
— | No | Additional CSS classes |