BT-10Buttons
Tear Button
A confirm button you tear off like a ticket stub, hole by hole.
no extra packages
PROPay Button and more like it are in Kokonut UI Pro
Installation
Tear 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/tear-button.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/tear-buttonUsage
import TearButton from "@/components/kokonutui/tear-button";
export default function Example() {
return <TearButton />;
}Props
tonekeyof typeof TONESDefault "default"Paper colour.
iconReactNodeDefault built-inShown in the round chip until the stub is torn; a trash can by default.
labelstringDefault "Delete workspace"descriptionstringDefault "Tear off the stub to confirm"stubLabelstringDefault "Tear"confirmedLabelstringDefault "Workspace deleted"confirmedDescriptionstringDefault "Kept in trash for 30 days"onConfirm() => voidCalled once the stub comes away.
resetAfternumberDefault 2400Print a fresh stub this many ms after confirming. Off when 0.
classNamestringExtra classes for the root element.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
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.

