BT-16ButtonsNew, October 21, 2026
Cart Button
An Add button that opens into a quantity stepper in place, with a bin at one and press-and-hold to repeat.
PROSelling products? Product Options Form is in Kokonut UI Pro
Installation
Cart 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/cart-button.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/cart-buttonOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/cart-button.tsx.
npm install lucide-react motionUsage
import CartButton from "@/components/kokonutui/cart-button";
export default function Example() {
return <CartButton />;
}Props
itemsCartItem[]Default built-indefaultQuantitiesRecord<string, number>Default { croissant: 2 }Starting quantities, by item id.
currencystringDefault "$"onCheckout(quantities: Record<string, number>) => voidclassNamestringExtra classes for the root element.
CartItem
idrequiredstringnamerequiredstringdetailrequiredstringPack size or weight, shown under the name.
pricerequirednumbericonrequiredLucideIcontintrequiredstringTailwind classes for the icon tile.
maxnumberDependencies
| 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.

