Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/digital-alchemy/llms.txt
Use this file to discover all available pages before exploring further.
Bookshelf renders five color-coded book spines displayed side-by-side, sitting on a decorative wooden shelf with table legs. Each spine represents a blog article and lifts upward on hover to reveal a “Read Tome” tooltip. The component is used on the Articles (/articles) page under the “Forbidden Knowledge” heading.
The component takes no props — the book data is defined in an internal array.
Books
Five books are hardcoded with unique colors, heights, and entrance delays:| Title | Color | Height | Entrance Delay |
|---|---|---|---|
| React Performance Runes | #4A0E4E (purple) | h-48 (12 rem) | 0.1 s |
| The CSS Grimoire | #004D40 (dark teal) | h-56 (14 rem) | 0.2 s |
| Accessibility Spells | #8B0000 (dark red) | h-44 (11 rem) | 0.3 s |
| State Management Alchemy | #1A237E (dark blue) | h-52 (13 rem) | 0.4 s |
| Framer Motion Secrets | #3E2723 (dark brown) | h-60 (15 rem) | 0.5 s |
Visual Structure
The layout is a flex row withitems-end justify-center gap-1 px-8 inside a h-64 container, so shorter books sit with their bases aligned at the shelf surface.
Each book spine
w-16 rounded-sm shadow-lg with height set by h-* Tailwind class. A linear-gradient overlay (opacity-20) runs horizontally across the spine to simulate the highlight and shadow of a round spine.
The spine text is text-parchment font-serif text-xs tracking-widest whitespace-nowrap -rotate-90 origin-center w-32 text-center — the w-32 and centered alignment ensure the rotated text is visually centred on the spine regardless of its actual length.
Two w-8 h-1 bg-white/20 rounded-full accent bars are positioned at the top and bottom of each spine (like binding bands).
Wooden shelf
repeating-linear-gradient(90deg, ...) overlay at opacity-20 creates a wood-grain texture effect.
Animation Details
Entrance (spring bounce)
bounce: 0.4 gives a satisfying physical feel.
Hover lift
zIndex: 20 ensures the hovered book renders above its neighbours if it visually overlaps them when scaled.
Tooltip
Adiv with absolute -top-12 left-1/2 -translate-x-1/2 bg-ink text-parchment text-xs px-3 py-1 rounded border border-turquoise/30 is shown via opacity-0 group-hover:opacity-100 transition-opacity. It reads “Read Tome” and is pointer-events-none so it doesn’t interfere with the hover state.
The book spines are currently purely decorative — they have no
onClick handlers or links to actual articles. The component is designed for visual impact; linking behavior can be added by wrapping each motion.div in an <a> or React Router <Link>.