BT-14ButtonsNew, October 21, 2026
Slide to Confirm
A confirm control for payments and other actions you can't take back. Slide the thumb to the end, or flick it.
PROTaking payments? Pay Button is in Kokonut UI Pro
Installation
Slide to Confirm is a free, open-source React component in the Kokonut UI Buttons collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/slide-to-confirm.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/slide-to-confirmOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/slide-to-confirm.tsx.
npm install lucide-react motionUsage
import SlideToConfirm from "@/components/kokonutui/slide-to-confirm";
export default function Example() {
return <SlideToConfirm />;
}Props
labelstringDefault "Slide to pay $48.00"What sliding does, e.g. "Slide to pay $48.00".
confirmingLabelstringDefault "Paying"Read out while onConfirm runs.
doneLabelstringDefault "Paid"Shown once it's done, e.g. "Paid".
onConfirm() => Promise<unknown> | unknownDefault () => wait(1200)The real work. Return a promise to keep the spinner up until it settles; a rejected promise sends the thumb back to the start.
resetAfternumber | nullDefault 2600Go back to the start this many ms after it's done. null stays done.
disabledbooleanDefault falseclassNamestringExtra classes for the root element.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

