Bookshelf
NEWAn interactive 3D bookshelf with animated book covers, keyboard navigation, and expandable reading details.
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/bookshelf
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| books | BookItem[] | required | Books to display, each with an id, title, author, and cover color. |
| openId | string | null | undefined | Optional controlled ID of the currently open book. |
| onOpenChange | (id: string | null, book?: BookItem) => void | undefined | Called when the open book changes. |
| onRead | (book: BookItem) => void | undefined | Called by the default Read action. |
| actions | (book: BookItem, close: () => void) => ReactNode | undefined | Replaces the default Read and Close actions. |
| ariaLabel | string | Bookshelf | Accessible label for the book list. |
| className | string | undefined | Additional classes for the bookshelf root. |