Bookmark Button

A ribbon drops into the bookmark and the label turns to Saved.

Preview

"use client";

import { BookmarkButton } from "@/components/motion/bookmark-button";

export function BookmarkButtonUsage() {
  return <BookmarkButton />;
}

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/bookmark-button

API Reference

saved?
boolean

Whether the item is saved, for controlled use.

Default—
defaultSaved?
boolean

The initial saved state when uncontrolled. Default: false

Defaultfalse
onSavedChange?
((saved: boolean) => void)

Called with the new state when the button is pressed.

Default—
showLabel?
boolean

Show "Save" / "Saved" next to the icon. Icon only when false.

Defaulttrue
name?
string

What is being saved, for the accessible name ("Save {name}").

Default—
labels?
Partial<{ save: string; saved: string; saveName: string; }>

Override any built-in string, e.g. for translation.

Default—
sound?
boolean

Play a soft drop on save and a tap on unsave. Off by default; a `SoundProvider` can mute it app-wide.

Defaultfalse
className?
string

Classes merged onto the root element.

Default—

Updated