BT-05Buttons
Hold Button
Press and hold to confirm, with a fill that drains back on early release and a drawn check on completion.
PROPay Button and more like it are in Kokonut UI Pro
Installation
Hold Button 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/hold-button.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/hold-buttonOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/hold-button.tsx.
npm install class-variance-authority lucide-react motionUsage
import HoldButton from "@/components/kokonutui/hold-button";
export default function Example() {
return <HoldButton />;
}Props
childrenReactNodeIdle label. Defaults to a verb that matches the variant.
holdDurationnumberDefault 1200How long (ms) the button has to be held.
holdingLabelReactNodeDefault "Keep holding"Label while holding.
completeLabelReactNodeLabel once the hold completes.
resetAfternumberDefault 1800How long (ms) the complete state shows before resetting. 0 keeps it.
onHoldComplete() => voidCalled once the button has been held for the full holdDuration. A short click or an early release never calls it.
Also takes every prop of Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> and VariantProps<typeof holdButtonVariants>.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
class-variance-authority | ^0.7.1 | npm, installed by the CLI |
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.

