From b5edaa1a7d0d51ccc465751403537d35d467c379 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Apr 2026 15:15:16 +0000 Subject: [PATCH 01/12] Add CLAUDE.md with standing frontend design instructions Encodes all principles from the Frontend Design Toolkit as operating instructions: aesthetic-first workflow, OKLCH design tokens, named aesthetic presets, motion/a11y rules, polish pipeline, and decision matrices for theming, testing, and docs currency. https://claude.ai/code/session_017ggBPbki5bwiHpFnqpSZ5U --- CLAUDE.md | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..75b8533 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,231 @@ +# Claude Code Frontend Design Toolkit — Standing Instructions + +This file encodes the principles from the Frontend Design Toolkit as standing instructions. Apply these on every frontend task. + +--- + +## Core Philosophy + +**Default Claude output is AI slop.** Same fonts (Inter), same purple gradient, same rounded card layout. Every frontend task must start by picking a real aesthetic direction before writing any code. Never default to generic. + +--- + +## Design Workflow (always follow this order) + +1. **Pick an aesthetic** — Choose a named style from the list below or derive one from the product context. Never code without a direction. +2. **Define tokens** — Use OKLCH color space. Build the palette from a single `--brand-hue` variable. One number controls everything. +3. **Code the UI** — Apply the aesthetic consistently. Use CSS variables and cohesive color systems. Block generic component patterns. +4. **Require real typography** — Pick an actual font pairing, not just whatever sans-serif is available. +5. **Add motion** — Audit for conditional UI that should animate but doesn't (`AnimatePresence` on conditional renders, transitions on dynamic styles). +6. **Polish pipeline** — After generating a page: fix spacing/typography/states → fix accessibility → fix motion/perf budgets. + +--- + +## Named Aesthetics (reference by name in prompts) + +| Aesthetic | Key Directives | +|-----------|---------------| +| **Swiss Minimalism** | Helvetica/Neue, strict grid, maximum white space, no decoration | +| **Neumorphism** | Soft box-shadows both directions, extruded elements, monochrome | +| **Glassmorphism** | `backdrop-filter: blur()`, frosted glass panels, transparency layers | +| **Brutalism** | System fonts, visible borders, no border-radius, loud color blocks, raw layout | +| **Claymorphism** | 3D clay blobs, very soft shadows, inflated shapes | +| **Aurora Mesh** | Flowing mesh gradients, soft color transitions, dreamy atmosphere | +| **Cyberpunk** | Neon on true `#000`, monospace type, glitch effects, scan lines, cyan/magenta | +| **3D Hyperrealism** | Depth, perspective, realistic lighting, layered z-space | +| **Block Maximalism** | Color blocks, bold contrast, loud typography, every pixel used | +| **Dark OLED Luxury** | True `#000000` bg, gold/cream accents, thin serif type, minimal chrome | +| **Organic Biomorphic** | Earth tones, rounded organic shapes, warm shadows, serif body text | +| **Editorial** | Serif headlines, magazine-style grid, muted palette, pull quotes | +| **SaaS Minimal** | One accent color, system UI font, generous air, card-based layouts | +| **Retro-Futuristic** | Gradient meshes, chrome accents, geometric shapes, purple/teal | +| **Art Deco** | Gold + black, geometric patterns, Playfair Display, strict symmetry | +| **Solarpunk** | Warm greens/golds/earth tones, organic + technical mix, hopeful, retro-futuristic type | + +--- + +## Design Tokens — Always Use This Pattern + +Build the entire color system from a single CSS custom property: + +```css +@import "tailwindcss"; +@theme { + --brand-hue: 250; /* Change this one number to re-theme everything */ + --color-primary: oklch(0.6 0.2 var(--brand-hue)); + --color-background: oklch(0.995 0.005 var(--brand-hue)); + --color-foreground: oklch(0.15 0.02 var(--brand-hue)); + --color-muted: oklch(0.94 0.01 var(--brand-hue)); + --color-border: oklch(0.88 0.015 var(--brand-hue)); + /* + typography scale, 4px spacing grid, radius, shadows */ +} +``` + +Rules: +- **Never hardcode hex values** — always use token references +- **Always include dark mode tokens** — semantic light/dark theming from the start +- **Use brand-tinted neutrals** — not pure white/black, always slightly hue-tinted +- **OKLCH color space** — wider gamut, perceptually uniform, use it exclusively + +--- + +## Typography Rules + +- Every project needs a deliberate font pairing (display + body, or serif + sans) +- Define a type scale (e.g. 12/14/16/20/24/32/48/64px) +- Set `line-height`, `letter-spacing`, and `font-weight` explicitly at each scale step +- Never leave font choices to browser defaults + +--- + +## Motion & Animation + +Every UI should have intentional motion. Audit for: +- Conditional renders without enter/exit transitions +- Dynamic data updates without smooth transitions +- Hover states with no visual feedback +- Page/route transitions that are instant + +Motion libraries by use case: +- **Framer Motion / Motion** — React animations, gestures, layout animations, spring physics +- **GSAP + ScrollTrigger** — Complex timelines, scroll-driven effects +- **anime.js** — Lightweight, CSS property animations +- **Lottie** — Designer-exported animation files + +Motion constraints (production): +- Respect `prefers-reduced-motion` — always add `@media (prefers-reduced-motion: reduce)` +- Duration budget: micro-interactions 100-200ms, transitions 200-400ms, page transitions 300-500ms +- Easing: prefer spring physics or `ease-out` — never linear for UI + +--- + +## Accessibility (non-negotiable) + +- All interactive elements must have keyboard navigation and visible focus states +- Use semantic HTML (`