TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dyed-in-the-wool/llms.txt
Use this file to discover all available pages before exploring further.
Projects component (internally function U) showcases three portfolio projects as interactive cards. Clicking any card triggers a Framer Motion shared-layout expansion — the card morphs fluidly into a full-screen modal without a cut or fade, creating the illusion of the card growing to fill the viewport.
What It Displays
The page renders:- Section header — the title “PATTERNS I’VE MADE” enters from above on mount.
- Card grid — three project cards arranged in a responsive grid. Each card shows the project title, a “technique type” label (the dyeing method metaphor), a color accent fill, and a tag list.
- Modal overlay — clicking a card opens an expanded modal with the full description and two action buttons: View Live (ExternalLink icon) and Source (Github icon). Clicking outside the modal or pressing the close button dismisses it.
Content Data
Projects are stored in thef array:
color value is used as the card’s full background fill and as the modal’s left-panel background tint.
Animation Details
| Element | Technique | Details |
|---|---|---|
| Section title | initial → animate on mount | y: -20 → 0, opacity: 0 → 1 |
| Cards | Framer Motion layoutId | Each card is a motion.div with layoutId: "card-{id}" |
| Card hover | whileHover scale | Cards scale to 1.02 |
| Card tap | whileTap scale | Cards scale to 0.98 on press |
| Card → modal expand | layoutId shared layout | The card and modal share the same layoutId string (e.g., "card-1"); Framer Motion interpolates all geometry |
| Modal backdrop | AnimatePresence + opacity | Background overlay fades in via opacity: 0 → 1 with bg-dye-fabric/80 backdrop-blur-sm |
| Modal exit | AnimatePresence exit | Reverse of the expand — modal shrinks back to card position |
About
layoutId modal animation: Framer Motion’s layoutId prop allows two separate elements in the React tree to be treated as the same element across mount/unmount events. When the card unmounts and the modal mounts, both share the same layoutId string (e.g., "card-1"), so Framer Motion automatically FLIP-animates the geometry transition between them. This means no manually coded position, transform, or getBoundingClientRect calls are needed — the library handles all positional interpolation automatically.Customization
Add a new project Append an object to thef array. All fields are required:
href="#" placeholders in the modal. Wire them up by adding url and repo fields to each f entry and threading them into the button href props inside the modal JSX.
Change card accent colors
Each project’s color field controls its card background fill and modal left-panel tint. Replace the hex value with any valid CSS color: