Docs / Components / Slide To Confirm

Slide To Confirm

A smooth, responsive slide-to-confirm button component with fluid spring drag physics for desktop and mobile touch devices.

Slide to confirm

Dependencies

Install the following dependencies to use this component:

1npm install motion lucide-react clsx tailwind-merge

Installation

Run the following command in your terminal to add the component to your project:

1npx rankflow-ui@latest add slide-to-confirm

Props Reference

PropTypeDefaultDescription
textstring'Slide to confirm'Text shown on track before sliding.
confirmedTextstring'Confirmed'Text shown on track after confirmation.
onConfirm() => void | Promise<void>undefinedCallback triggered on successful slide completion.
onReset() => voidundefinedCallback triggered when reset.
isConfirmedbooleanundefinedControlled confirmed state.
disabledbooleanfalseDisabled state.
classNamestring''Additional container CSS classes.