From ui-ux
Design tokens, typography scales, spacing systems, color theory, and visual hierarchy principles for creating cohesive, polished interfaces with Tailwind CSS.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ui-ux:design-systemThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use a modular scale with 1.25 ratio for consistent visual rhythm:
Use a modular scale with 1.25 ratio for consistent visual rhythm:
| Role | Tailwind Class | Size | Weight | Line Height |
|---|---|---|---|---|
| Display | text-5xl | 48px | font-bold | leading-tight |
| H1 | text-4xl | 36px | font-bold | leading-tight |
| H2 | text-2xl | 24px | font-semibold | leading-tight |
| H3 | text-xl | 20px | font-semibold | leading-snug |
| H4 | text-lg | 18px | font-medium | leading-snug |
| Body | text-base | 16px | font-normal | leading-relaxed |
| Small | text-sm | 14px | font-normal | leading-normal |
| Caption | text-xs | 12px | font-medium | leading-normal |
Rules:
tracking-tight on display and H1 headings for visual densitymax-w-prose or max-w-2xl)text-muted-foreground for secondary/supporting text4px base unit. Every spacing value should be a multiple of 4:
| Scale | Tailwind | Pixels | Usage |
|---|---|---|---|
| xs | gap-1 / p-1 | 4px | Tight spacing between inline elements |
| sm | gap-2 / p-2 | 8px | Related items within a group |
| md | gap-3 / p-3 | 12px | Default component internal padding |
| base | gap-4 / p-4 | 16px | Standard component padding, list item gaps |
| lg | gap-6 / p-6 | 24px | Section padding, card content padding |
| xl | gap-8 / p-8 | 32px | Major section gaps, page horizontal padding |
| 2xl | gap-12 / p-12 | 48px | Between major page sections |
| 3xl | gap-16 / p-16 | 64px | Page vertical padding, hero sections |
Rules:
p-4 to p-6gap-4 to gap-6px-6 to px-16py-12 to py-16gap-5 and gap-6 in the same viewUse the semantic color tokens, not raw colors:
bg-primary) — Brand color. Main CTAs, active navigation, selected states.bg-secondary) — Supporting actions. Secondary buttons, hover backgrounds.bg-muted) — Subtle backgrounds. Sidebar, code blocks, disabled states.bg-accent) — Highlight color. Hover states, active rows, chips.bg-destructive) — Danger/delete. Error states, destructive buttons, alerts.When establishing a color direction for a project:
text-foreground), medium for secondary (text-muted-foreground)border-border at 1px for card boundaries. Use whitespace/shadow instead of borders when possible.Establish importance through these tools, in order of impact:
Common hierarchies:
Shadow scale creates visual layering:
| Level | Tailwind | Usage |
|---|---|---|
| Flat | no shadow | Inline elements, backgrounds |
| Raised | shadow-sm | Cards, list items |
| Elevated | shadow-md | Dropdown menus, popovers |
| Floating | shadow-lg | Tooltips, floating action buttons |
| Overlay | shadow-xl | Modals, dialog boxes |
Rules:
shadow-sm default, shadow-md on hover for interactive cardsshadow-xl + backdrop-blur-sm on the overlay backgroundring-2 ring-ring ring-offset-2 — visible, consistent, accessibleAnimation durations and easing for Framer Motion and CSS transitions:
| Interaction | Duration | Easing |
|---|---|---|
| Micro-interaction (hover, focus) | 150-200ms | ease-out |
| Element enter/appear | 200-300ms | ease-out / [0.16, 1, 0.3, 1] |
| Element exit/disappear | 150-200ms | ease-in |
| Page transition | 300-500ms | ease-in-out |
| Layout shift | 200-400ms | spring (stiffness: 300, damping: 30) |
| Stagger delay (list items) | 50-100ms per item | — |
Rules:
spring physics for layout animations — feels more natural than linear easingprefers-reduced-motion — use motion-safe: Tailwind modifiernpx claudepluginhub connorbell133/ui-ux-plugins --plugin ui-uxCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.