TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/spell-index/llms.txt
Use this file to discover all available pages before exploring further.
SpellBook component renders the skills section of the portfolio as a physical hardcover book. A dark leather spine sits on the left, and the open page area displays one chapter at a time on a cream parchment background. Visitors page through chapters using prev/next chevron buttons below the book. The component takes no props — all data is defined internally.
Data structure
Three chapters are hardcoded as aconst array inside SpellBook.js. Each chapter object contains a title, an incantation subtitle, and a skills array where every skill has a name and a level (0–100 integer representing percentage mastery):
Visual layout
Book shell
The outer container isrelative w-full max-w-4xl mx-auto h-[600px] with perspective-1000 applied to enable child 3D transforms. Inside it, a dark background div (bg-ink) provides the book body, styled with heavy drop shadows to suggest depth:
Spine
Aw-12 left strip (bg-void) mimics the book spine with three horizontal amber rule marks to suggest binding stitches.
Parchment page
The right portion isbg-[#e8dcc7] (warm cream). A noise SVG texture is layered on top at 40 % opacity with mix-blend-multiply to simulate aged paper grain:
Page-turn animation
Chapter content is wrapped in Framer Motion’sAnimatePresence mode="wait" so the exiting chapter fully completes its animation before the entering one begins. A custom direction value (stored in state as +1 or -1) is passed as the Framer Motion custom prop to drive directional rotation:
motion.div page uses transformStyle: "preserve-3d" and origin-left so the rotation pivots from the spine edge, matching how a real book page would turn. The transition is a spring with duration: 0.6 and bounce: 0.2.
Skill progress bars
Each skill inside a chapter renders a label row (name left, percentage right) and a progress bar below it. The bar track isbg-ink/10 and the fill is a motion.div that animates its width from 0 to ${level}% on mount:
index * 0.1 s so they fill in sequence from top to bottom.
Navigation buttons
Two chevron buttons (ChevronLeft, ChevronRight from Lucide React) sit 80 px below the book in a centered flex row. The onClick handler increments or decrements the currentChapter index and stores the direction:
disabled when at the first or last chapter and dim to 30 % opacity via disabled:opacity-30.
Usage
Modifying chapter data
To add a new chapter or skill, edit thechapters array at the top of SpellBook.js:
Adding more than three chapters will work without code changes — the prev/next buttons check
index >= 0 && index < chapters.length dynamically. The parchment page area has overflow-hidden so keep skill lists to four items or fewer to avoid clipping on smaller displays.