1---2name: design-system3description: SKILL — Design System4metadata:5 source: https://skillmd.com/skills/nickgallick/design-system6---7# SKILL — Design System89Pixel's comprehensive design system architecture. Every design must conform to these tokens, components, and patterns.1011---1213## Design Tokens1415### Colors1617#### Semantic Colors18| Token | Purpose | Usage |19|-------|---------|-------|20| `primary` | Main brand action | Buttons, links, active states |21| `secondary` | Supporting actions | Secondary buttons, tags |22| `accent` | Highlight, emphasis | Badges, notifications, callouts |23| `destructive` | Danger, deletion | Delete buttons, error states |24| `success` | Confirmation, positive | Success messages, checkmarks |25| `warning` | Caution | Warning banners, alerts |26| `info` | Informational | Info tooltips, help text |2728#### Neutral Scale29| Token | Value | Usage |30|-------|-------|-------|31| `background` | Brand-specific | Page background |32| `foreground` | Brand-specific | Primary text |33| `muted` | Brand-specific | Disabled text, placeholders |34| `muted-foreground` | Brand-specific | Secondary text on muted backgrounds |35| `border` | Brand-specific | Dividers, input borders |36| `card` | Brand-specific | Card backgrounds |37| `card-foreground` | Brand-specific | Text on cards |38| `popover` | Brand-specific | Dropdown/popover backgrounds |3940See the `brand-systems` skill for brand-specific color values.4142### Typography4344| Token | Size | Weight | Line Height | Usage |45|-------|------|--------|-------------|-------|46| `display` | 48px / 3rem | 700 | 1.1 | Hero headings only |47| `h1` | 36px / 2.25rem | 700 | 1.2 | Page titles |48| `h2` | 30px / 1.875rem | 600 | 1.25 | Section headings |49| `h3` | 24px / 1.5rem | 600 | 1.3 | Subsection headings |50| `h4` | 20px / 1.25rem | 600 | 1.35 | Card titles |51| `body-lg` | 18px / 1.125rem | 400 | 1.6 | Emphasis body text |52| `body` | 16px / 1rem | 400 | 1.5 | Default body text |53| `body-sm` | 14px / 0.875rem | 400 | 1.5 | Secondary text, captions |54| `caption` | 12px / 0.75rem | 400 | 1.4 | Labels, metadata |55| `micro` | 10px / 0.625rem | 500 | 1.2 | Badges, tags (use sparingly) |5657### Spacing (4px Grid)5859All spacing values must be multiples of 4px.6061| Token | Value | Usage |62|-------|-------|-------|63| `space-1` | 4px | Tight inline spacing, icon-to-text gap |64| `space-2` | 8px | Compact element spacing, input padding |65| `space-3` | 12px | Related item spacing |66| `space-4` | 16px | Default element spacing, card padding |67| `space-5` | 20px | Comfortable spacing |68| `space-6` | 24px | Section sub-spacing |69| `space-8` | 32px | Section spacing |70| `space-10` | 40px | Large section gaps |71| `space-12` | 48px | Page section spacing |72| `space-16` | 64px | Major section breaks |73| `space-20` | 80px | Hero spacing |74| `space-24` | 96px | Maximum section spacing |7576### Border Radius7778| Token | Value | Usage |79|-------|-------|-------|80| `radius-sm` | 4px | Badges, tags, small elements |81| `radius-md` | 8px | Buttons, inputs, cards |82| `radius-lg` | 12px | Modals, large cards |83| `radius-xl` | 16px | Feature cards, hero elements |84| `radius-full` | 9999px | Avatars, pills, circular elements |8586### Shadows8788| Token | Value | Usage |89|-------|-------|-------|90| `shadow-sm` | `0 1px 2px rgba(0,0,0,0.05)` | Subtle elevation, inputs |91| `shadow-md` | `0 4px 6px rgba(0,0,0,0.1)` | Cards, dropdowns |92| `shadow-lg` | `0 10px 15px rgba(0,0,0,0.15)` | Modals, popovers |93| `shadow-xl` | `0 20px 25px rgba(0,0,0,0.2)` | Full-screen overlays |9495Note: In dark themes, shadows are less effective. Use border + background contrast instead.9697### Breakpoints9899| Token | Value | Usage |100|-------|-------|-------|101| `mobile` | 0–639px | Mobile-first base styles |102| `sm` | 640px | Large phones, small tablets |103| `md` | 768px | Tablets |104| `lg` | 1024px | Small desktops, landscape tablets |105| `xl` | 1280px | Standard desktops |106| `2xl` | 1536px | Large desktops |107108---109110## Components111112### Buttons113114#### Variants115| Variant | Usage |116|---------|-------|117| `primary` | Main action — one per screen section |118| `secondary` | Supporting action |119| `outline` | Tertiary action, less emphasis |120| `ghost` | Inline action, minimal emphasis |121| `destructive` | Delete, remove, dangerous actions |122| `link` | Inline text action |123124#### Sizes125| Size | Height | Padding | Font |126|------|--------|---------|------|127| `sm` | 32px | 12px horizontal | 14px |128| `md` | 40px | 16px horizontal | 14px |129| `lg` | 48px | 24px horizontal | 16px |130131#### States (Required for ALL buttons)132- **Default** — Resting state133- **Hover** — Cursor over (desktop only)134- **Active/Pressed** — Being clicked/tapped135- **Focus** — Keyboard focus ring (2px offset, brand color)136- **Disabled** — Reduced opacity (0.5), no pointer events137- **Loading** — Spinner replaces text, maintains button width138139### Inputs140141#### Types142- Text input (single line)143- Textarea (multi-line)144- Select / dropdown145- Checkbox146- Radio147- Toggle / switch148- Date picker149- File upload150151#### States (Required for ALL inputs)152- **Default** — Empty, resting153- **Focused** — Active border, label animation154- **Filled** — Contains value155- **Error** — Red border, error message below156- **Disabled** — Reduced opacity, no interaction157- **Read-only** — Visible value, no interaction158159#### Rules160- Always include labels (never placeholder-only)161- Error messages appear below the input, not in tooltips162- Group related inputs with clear sections163- Min height for touch: 44px164165### Cards166167#### Anatomy168- Container (background, border, radius, optional shadow)169- Header (optional — title, subtitle, action)170- Content (primary card content)171- Footer (optional — actions, metadata)172173#### Rules174- Consistent padding: 16px minimum, 24px recommended175- Cards in a grid must be equal height (use flexbox/grid)176- Clickable cards need hover state and cursor pointer177- Don't nest cards inside cards178179### Navigation180181#### Web182- Top navigation bar for primary navigation183- Sidebar for complex applications (dashboards)184- Breadcrumbs for deep hierarchies185- Tabs for same-page content switching186187#### Mobile188- Bottom tab bar for primary navigation (max 5 items)189- Stack navigation for drill-down flows190- Modal for focused tasks191- Bottom sheet for contextual actions192- NEVER use hamburger menus193194### Feedback195196| Type | Usage | Duration |197|------|-------|----------|198| Toast | Non-critical confirmation | 3-5 seconds, auto-dismiss |199| Alert banner | Important, persistent info | Until dismissed or resolved |200| Inline error | Field-level validation | Until corrected |201| Modal dialog | Critical confirmation | Until user responds |202| Progress bar | Long operations | Until complete |203| Skeleton | Content loading | Until content loads |204205### Data Display206207| Component | Usage |208|-----------|-------|209| Table | Structured, comparable data |210| List | Sequential items |211| Grid | Visual items (products, media) |212| Chart | Trends, comparisons, distributions |213| Stat card | Key metrics, KPIs |214| Timeline | Chronological events |215216---217218## Patterns219220### Form Patterns221- Single column forms for simplicity222- Progressive disclosure for complex forms223- Inline validation on blur224- Submit button at bottom-right (web) or full-width (mobile)225- Clear vs. cancel — "Cancel" returns, "Clear" resets226227### Search Patterns228- Search input with icon229- Instant results (debounced)230- Recent searches231- Empty state for no results232- Filter chips for refinement233234### Authentication Patterns235- Email + password (primary)236- Social login buttons (secondary)237- Magic link (optional)238- Password requirements shown during creation239- Error messages must not leak user existence240241---242243## Design System Rules2442451. **Every component must use design tokens** — No hardcoded colors, sizes, or spacing2462. **Every interactive element must have all states defined** — No missing hover, focus, disabled2473. **Every screen must handle all edge states** — See edge-state-design skill2484. **Typography must follow the type scale** — No arbitrary font sizes2495. **Spacing must follow the 4px grid** — No arbitrary pixel values2506. **Colors must meet WCAG AA contrast** — Minimum 4.5:1 for text, 3:1 for large text2517. **Touch targets must be 44px minimum** — On both web and mobile2528. **Animations must respect prefers-reduced-motion** — Always provide static fallback2539. **Components must be consistent across screens** — Same component, same behavior everywhere25410. **Dark theme is the default** — All our brands use dark themes. Design dark-first.255256### Dark Theme Specifics257- Use elevated surface colors instead of shadows for depth258- Reduce image brightness/saturation slightly259- Ensure sufficient contrast between surface layers260- Primary colors may need lightened variants for dark backgrounds261- Avoid pure white (#FFFFFF) text — use off-white (#E5E7EB or similar)262- Avoid pure black (#000000) backgrounds — use near-black with slight color