Bookstore Section
A shelf of staff picks; pulling a book out shows its cover, rating, blurb and a reader review.
Installation
npx shadcn@latest add @venusui/books-01Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Files added to your project
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/bookshelf.tsxfrom bookshelf@/components/books-01.tsx
Also adds the shadcn button component if your project doesn't have it yet.
Usage
The code behind the preview above.
books-01-demo.tsx
import { Books01 } from "@/components/books-01"
export default function Books01Demo() {
return <Books01 />
}
API reference
No props. The books are an array at the top of the file.
Requirements
- shadcn
buttonand VenusUIbookshelf. The CLI installs them. - React 19 and Tailwind CSS v4.
Customization
- Each book carries its price, rating, blurb and one review; load them from your catalog.
Accessibility
- The details update politely when a book is picked; the rating is given as text.
Troubleshooting
- Something looks different from the preview.
- Blocks use your project’s theme and your own shadcn components, so they follow your styles.
Unknown registry "@venusui"- Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (
npx shadcn@latest), install by URL, or register it with its address:npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json. No components.json found- Run
npx shadcn@latest initin your project first.