Bookshelf

Preview

Install

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

$ bunx --bun shadcn add @beui/bookshelf

API Reference

books
BookshelfBook[]
Default—
value?
string | null

Id of the open book, or null. Pass to control the shelf.

Default—
defaultValue?
string | null
Defaultnull
onValueChange?
((id: string | null) => void)
Default—
height?
number

Book height in px.

Default300
coverRatio?
number

Cover width as a fraction of the height.

Default0.68
gap?
number

Space between closed books in px.

Default3
openGap?
number

Extra space on each side of the open book in px.

Default16
tilt?
boolean

Tilt the open cover toward the mouse. Mouse only, off with reduced motion.

Defaulttrue
sound?
boolean

Play a slide as a book comes out or goes back, and a soft tap as the mouse runs along the spines. Default false.

Defaultfalse
labels?
Partial<{ label: string; book: string; bookWithAuthor: string; }>

Override any built-in string.

Default—
className?
string
Default—

Updated