--- name: v0 description: Use this skill whenever building, editing, or reviewing user-facing software with v0 — web apps, dashboards, marketing sites, component libraries, or any code change that produces visual output. Triggers on requests to "build a UI", "design a page", "make a component", "improve the look", "polish this", "make it production-ready", or whenever scaffolding a new app/screen/feature with visible surface area. Encodes v0's opinionated defaults for Tailwind CSS patterns, shadcn/ui components, design tokens, typography, spacing, color, motion, accessibility, and the component patterns that hold up under real users. version: 1.0.0 triggers: - build a UI - design a page - make a component - improve the look - polish this - make it production-ready - create a landing page - build a dashboard - add a form stack: - Next.js - React - Tailwind CSS - shadcn/ui - TypeScript --- # v0 Design & Development Skill A comprehensive guide to creating professional-grade, visually stunning web applications with exceptional UI/UX. --- ## Table of Contents 1. [Design Philosophy](#design-philosophy) 2. [Color System](#color-system) 3. [Typography](#typography) 4. [Layout & Spacing](#layout--spacing) 5. [Component Architecture](#component-architecture) 6. [Tailwind CSS Patterns](#tailwind-css-patterns) 7. [Accessibility](#accessibility) 8. [Performance](#performance) 9. [Code Organization](#code-organization) 10. [UI/UX Principles](#uiux-principles) 11. [Common Patterns](#common-patterns) 12. [Anti-Patterns to Avoid](#anti-patterns-to-avoid) --- ## Design Philosophy ### Core Principles 1. **Restraint over excess** — Great design is about what you leave out, not what you add 2. **Clarity over cleverness** — Users should understand interfaces instantly 3. **Consistency over novelty** — Predictable patterns reduce cognitive load 4. **Purpose over decoration** — Every element must earn its place 5. **Ship interesting, never ugly** — Balance creativity with polish ### The v0 Aesthetic - Clean, modern interfaces with generous whitespace - Subtle shadows and borders that create depth without distraction - Smooth, purposeful animations that guide attention - Professional color palettes that feel cohesive - Typography that establishes clear hierarchy --- ## Color System ### The 3-5 Color Rule **ALWAYS use exactly 3-5 colors total.** This constraint forces cohesion. #### Required Structure ``` 1 Primary Brand Color → CTAs, key actions, brand identity 2-3 Neutrals → Backgrounds, text, borders 1-2 Accent Colors → Status indicators, highlights, secondary actions ``` #### Color Selection Guidelines | Use Case | Recommendation | |----------|----------------| | Primary actions | Saturated, accessible brand color | | Backgrounds | Off-whites, soft grays (never pure white for large areas) | | Text | Near-black (#0a0a0a to #1a1a1a), not pure black | | Borders/Dividers | Very subtle grays (opacity 10-20%) | | Success states | Greens in the teal family | | Error states | Warm reds, never aggressive | | Warning states | Amber/orange tones | #### Color Temperature Rules - **DO** use analogous colors: blue→teal, purple→pink, orange→red - **DON'T** mix opposing temperatures: pink→green, orange→blue, red→cyan #### Gradient Rules - **Avoid gradients unless explicitly requested** — solid colors are cleaner - If gradients are necessary: - Use only as subtle accents, never for primary elements - Maximum 2-3 color stops - Use analogous colors only - Consider gradient direction (usually top-to-bottom or diagonal) #### Design Token Structure Always use semantic design tokens in CSS variables: ```css :root { /* Backgrounds */ --background: 0 0% 100%; --foreground: 0 0% 3.9%; /* Cards & Surfaces */ --card: 0 0% 100%; --card-foreground: 0 0% 3.9%; /* Primary Actions */ --primary: 0 0% 9%; --primary-foreground: 0 0% 98%; /* Secondary Actions */ --secondary: 0 0% 96.1%; --secondary-foreground: 0 0% 9%; /* Muted Elements */ --muted: 0 0% 96.1%; --muted-foreground: 0 0% 45.1%; /* Accents */ --accent: 0 0% 96.1%; --accent-foreground: 0 0% 9%; /* Destructive Actions */ --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; /* Borders & Inputs */ --border: 0 0% 89.8%; --input: 0 0% 89.8%; --ring: 0 0% 3.9%; /* Radius */ --radius: 0.5rem; } ``` **Critical Rule:** Never use direct colors like `text-white`, `bg-black`. Everything must be themed via tokens. --- ## Typography ### The 2 Font Maximum Rule **ALWAYS limit to maximum 2 font families.** More fonts create visual chaos. #### Font Pairing Strategy ``` Headings: Display or Sans-serif with personality (multiple weights) Body: Highly readable sans-serif or serif ``` #### Recommended Pairings | Style | Headings | Body | |-------|----------|------| | Modern Tech | Inter, Geist | Inter, Geist | | Editorial | Playfair Display | Source Sans Pro | | Startup | Cal Sans, Manrope | Inter | | Corporate | Outfit | System UI | | Creative | Space Grotesk | DM Sans | #### Typography Scale Use a consistent scale with clear hierarchy: ```css /* Recommended Tailwind Classes */ text-xs → 12px → Fine print, labels text-sm → 14px → Secondary text, captions text-base → 16px → Body text (minimum for readability) text-lg → 18px → Lead paragraphs text-xl → 20px → Section headers text-2xl → 24px → Card titles text-3xl → 30px → Page sections text-4xl → 36px → Hero subheadings text-5xl → 48px → Hero headings text-6xl+ → 60px+ → Display headings (use sparingly) ``` #### Line Height Rules - **Body text:** `leading-relaxed` (1.625) or `leading-6` to `leading-7` - **Headings:** `leading-tight` (1.25) or `leading-snug` (1.375) - **Never** use default line-height for body text — it's too tight #### Text Wrapping - Wrap titles in `text-balance` for optimal line breaks - Use `text-pretty` for important copy - Set `max-w-prose` or `max-w-2xl` for readable line lengths #### Font Implementation in Next.js ```tsx // layout.tsx import { Inter, Playfair_Display } from 'next/font/google' const inter = Inter({ subsets: ['latin'], variable: '--font-sans' }) const playfair = Playfair_Display({ subsets: ['latin'], variable: '--font-serif' }) export default function RootLayout({ children }) { return (
{children} ) } ``` ```js // tailwind.config.js module.exports = { theme: { extend: { fontFamily: { sans: ['var(--font-sans)'], serif: ['var(--font-serif)'], }, }, }, } ``` --- ## Layout & Spacing ### Mobile-First Design **ALWAYS design mobile-first, then enhance for larger screens.** ```tsx // ✅ Mobile-first approach{description}
// Decorative images
// Complex images