Book Shelf
A row of books standing spine-out on a shelf. Click a book and it swings open to the right until its front cover faces you. Click it again (or press Esc, or click outside) and it swings back. The books on its right slide over to make room. Only transforms are animated (x, rotateY) for maximum performance.
Installation
- 1
Install the component:
- 2
Usage:
jsxapp/page.jsx
const books = [ { id: "atomic-habits", title: "Atomic Habits", author: "James Clear", color: "#2d2a7b", textColor: "#d8b86a", thickness: 38, height: 258 }, { id: "48-laws", title: "The 48 Laws of Power", author: "Robert Greene", color: "#111111", textColor: "#e0a03a", thickness: 34, height: 278 },];<BookShelf books={books} />