The Writing page (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/magical/llms.txt
Use this file to discover all available pages before exploring further.
/writing) is titled The Tomes and subtitled “Inscribed Thoughts & Chronicles.” It presents five writing entries as physical books standing on an animated shelf. Hovering any book causes it to rise, and a floating tooltip card appears above it showing a type badge, title, summary, and a call-to-action to open the full entry.
Visual & UX Overview
Animated Bookshelf
Books stand vertically in a horizontal
flex row with items-end, each with a distinct background and text color defined per entry. A h-4 bg-mystic-900 border-t border-mystic-800 bar at the bottom creates the shelf ledge with a shadow-[0_10px_20px_rgba(0,0,0,0.5)] drop shadow. The shelf area uses h-96.Book Hover Rise Effect
On hover, a book’s height transitions from
h-[85%] to h-[95%] of the h-96 container (it “rises” upward from its base). This is achieved via a Framer Motion layout prop on the book motion.div, with a CSS transition-all duration-300 class alongside conditional class application.Floating Tooltip
When a book is hovered, a
w-72 tooltip card floats above it via position: absolute bottom-full. The card contains: a type label (in the entry’s text color), the entry title, a summary paragraph, and an “Open Volume” link. It appears and disappears with a Framer Motion AnimatePresence fade + translate.Shelf Shadow
The bottom shelf bar is positioned absolutely at
bottom-0 with z-0. Books are rendered on top at z-10 using relative z-10 h-96. The combined shadow creates a tangible, physical shelf quality.Writing Entries Data
The five writing entries are stored as a static array. Each entry has anid, title, type, date, summary, color (Tailwind classes for card background and border), and textColor (for the type label):
Entry Summary Table
| Title | Type | Date | Color |
|---|---|---|---|
| The Anatomy of a Memory Leak | Bug Report | Oct 2023 | bg-mystic-900 border-mystic-violet/40 |
| CSS Grid: Sacred Geometry | Technical Writeup | Aug 2023 | bg-mystic-950 border-mystic-teal/40 |
| From Triage to Try/Catch | Reflection | May 2023 | bg-mystic-800 border-mystic-mint/40 |
| Accessibility as Empathy | General Audience | Jan 2023 | bg-mystic-900 border-slate-500/40 |
| State Management Rituals | Technical Writeup | Nov 2022 | bg-mystic-950 border-mystic-violet/40 |
Book Rise Animation
Each book uses a conditional class switch and a Framer Motionlayout prop to animate the height change smoothly:
hoveredBook is managed as a single state at the shelf level (storing the hovered entry’s id, or null). Only one tooltip is visible at a time. If the user moves directly from one book to another, the previous tooltip exits and the new one enters simultaneously via AnimatePresence.Tooltip Anatomy
Each floating tooltip contains:- Type label — rendered in the entry’s
textColor(e.g.,text-mystic-violetfor Bug Report). - Entry title — displayed in
font-serif, matching the book spine. - Summary — the full
summarytext from the entry object. - “Open Volume” CTA — displayed with a book icon at the bottom of the tooltip.
absolute bottom-full mb-6 left-1/2 -translate-x-1/2 and includes a decorative diamond rotate-45 caret at its base.
Customization
Adding a new writing entry
Adding a new writing entry
Append a new object to the
writings array. Choose distinct color and textColor Tailwind classes to keep each book visually unique. Assign a new id and fill in title, type, date, and summary. The shelf will expand to accommodate the new book — no layout changes needed.Linking to real articles
Linking to real articles
The current entries do not have URL fields in the source data. To add links, extend each entry object with a
url field and update the “Open Volume” CTA to use that URL (e.g., window.open(url, "_blank") for external links).Adjusting rise height
Adjusting rise height
The resting height is
h-[85%] and hover height is h-[95%]. Increase the hover value (e.g., to h-[100%]) for a more dramatic pull-from-shelf effect. Decrease the resting value (e.g., to h-[80%]) to create a deeper “shelf well” appearance.Component Dependencies
| Component | Source | Role |
|---|---|---|
BackgroundEffects | components/BackgroundEffects.js | Ambient particle and blur layer |
Navigation | components/Navigation.js | Fixed top navigation bar |
motion / AnimatePresence | Framer Motion | Book rise animation (layout), tooltip enter/exit transitions |