# Bookmark Button

> A save button whose bookmark fills from the top like a dropped ribbon while the label rolls to Saved.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Buttons |
| Live preview | https://uibrik.com/components/bookmark-button |
| Writes | 1 file into `components/uibrik/bookmark-button/` |
| Packages | `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/bookmark-button.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/bookmark-button`.

Can't run commands? https://uibrik.com/components/bookmark-button/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { BookmarkButton } from "@/components/uibrik/bookmark-button/bookmark-button";

<BookmarkButton
  label="Save"
  savedLabel="Saved"
  display="label"
  fill="drop"
  sparkles
  tint={false}
  variant="soft"
  size="md"
  radius={12}
  defaultSaved={false}
  onChange={(saved) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/bookmark-button.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `label` | `string` | `"Save"` | Button text. |
| `savedLabel` | `string` | `"Saved"` | Shown once saved. |
| `display` | `"label" \| "icon"` | `"label"` | Icon and label, or the icon alone (the label stays as its accessible name). |
| `fill` | `"drop" \| "rise" \| "pop"` | `"drop"` | How the bookmark fills: from the top, from the bottom, or out from the centre. |
| `sparkles` | `boolean` | `true` | Three sparkles pop around the icon on save. |
| `tint` | `boolean` | `false` | Colour the saved bookmark and its sparkles instead of keeping them neutral. |
| `color` | `string` | `"#f59e0b"` | Colour of the saved bookmark when tinted. |
| `variant` | `"soft" \| "ghost" \| "outline"` | `"soft"` | Filled, transparent until hovered, or outlined. |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Height, padding and text size. |
| `radius` | `number` | `12` | Corner radius. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `defaultSaved` | `boolean` | `false` | Whether it starts saved. |
| `onChange` | `(saved: boolean) => void` |  | Called with the new state after each toggle. |
| `className` | `string` |  | Classes for the button. |

## Where it fits

- **Saving articles and recipes**: The ribbon fills from the top while the label rolls to Saved, so users know the item is kept.
- **E-commerce wishlists**: A clear saved state on product cards encourages shoppers to come back to what they liked. Pairs with [Stepper Button](https://uibrik.com/components/stepper-button.md).
- **Favourites in apps**: One reusable save button keeps saved searches, posts and places consistent across an app.

## Same shelf: Buttons

- [Chain Copy](https://uibrik.com/components/chain-copy.md): A copy-link button whose chain icon snaps apart when pressed, flings two chips from the break, then swings back together and relinks as the label rolls to Copied.
- [Copy Button](https://uibrik.com/components/copy-button.md): A copy button whose two sheets slide together into a check while the label rolls to Copied.
- [Expand Button](https://uibrik.com/components/expand-button.md): An icon-only button that springs open to reveal its label on hover or keyboard focus.
- [Hold to Confirm](https://uibrik.com/components/hold-to-confirm.md): A destructive-action button that has to be held down; a fill grows across it and drains back if released early.
- [Inline Confirm](https://uibrik.com/components/inline-confirm.md): A destructive button that splits into Cancel and Confirm in its own footprint, so nothing around it moves.
- [Mesh Button](https://uibrik.com/components/mesh-button.md) (Pro): A button painted with a softly blended mesh gradient under rolling silk waves that catch a satin sheen; the pointer presses into the silk and a click ripples it.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/bookmark-button/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
