Save Button - React Component | Kokonut UI
Save Button
A bookmark button that files into collections. Tap to save to the last one, then change it or make a new one from the strip.
Install with
npx shadcn@latest add https://kokonutui.com/r/save-button.json
lucide-react, motion
Installation
Save 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/save-button.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/save-button
Or add it by hand: install its packages, then copy the source from above into components/kokonutui/save-button.tsx.
npm install lucide-react motion
Usage
import SaveButton from "@/components/kokonutui/save-button";
export default function Example() {
return <SaveButton />;
}
Props
collections
SaveCollection[] Default built-in
defaultCollection
string
Where a tap saves to, by id. Defaults to the first collection.
defaultSaved
boolean Default false
onSave
(collectionId: string) => void
onMove
(collectionId: string) => void
onRemove
() => void
className
string
Extra classes for the root element.
SaveCollection
id required
string
name required
string
count required
number
Items already in it, before this one.
color required
string
Tailwind background class for its swatch.
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.