Black Friday: 30% off Pro

Get 30% off

Updated

Bookmark Button

Preview

Customize

Icon + label
Drop
Soft
Medium
Radius12px

Installation

npx shadcn@latest add https://uibrik.com/r/bookmark-button.json
Adds the files to components/uibrik/bookmark-button and installs motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/bookmark-button.

Usage

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) => {}}/>

Where to use Bookmark Button

  • 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

  • Favourites in apps

    One reusable save button keeps saved searches, posts and places consistent across an app.

Props

BookmarkButton
label
Type string
"Save"
Button text.
savedLabel
Type string
"Saved"
Shown once saved.
display
Type "label" | "icon"
"label"
Icon and label, or the icon alone (the label stays as its accessible name).
fill
Type "drop" | "rise" | "pop"
"drop"
How the bookmark fills: from the top, from the bottom, or out from the centre.
sparkles
Type boolean
true
Three sparkles pop around the icon on save.
tint
Type boolean
false
Colour the saved bookmark and its sparkles instead of keeping them neutral.
color
Type string
"#f59e0b"
Colour of the saved bookmark when tinted.
variant
Type "soft" | "ghost" | "outline"
"soft"
Filled, transparent until hovered, or outlined.
size
Type "sm" | "md" | "lg"
"md"
Height, padding and text size.
radius
Type number
12
Corner radius.
defaultSaved
Type boolean
false
Whether it starts saved.
onChange
Type (saved: boolean) => void
–
Called with the new state after each toggle.
className
Type string
–
Classes for the button.