Loading...
Loading...

Every project starts with the same question: what does it look like?
I used to spend two weeks picking colors, defining spacing scales, choosing typography, building a component library. Two weeks before writing a single feature.
Now I spend an afternoon. AI handles the tedious parts. I handle the taste.
Strip away the jargon. A design system is three things:
Most tutorials focus on components. But tokens are where consistency comes from. Get your tokens right and components almost build themselves.
This is where AI shines. Color theory is math. AI is good at math.
I give Claude my brand's primary color and ask for a complete system:
I need a complete color system for a web application.
Primary brand color: #c96442 (terracotta)
Generate:
1. A full oklch-based color scale (50-950) for the primary color
2. A neutral gray scale that complements the primary
3. Semantic colors: success, warning, error, info
4. Surface colors for light and dark mode
5. Text colors with proper contrast ratios (WCAG AA minimum)
Format as CSS custom properties using oklch color space.
Ensure all text/background combinations meet 4.5:1 contrast ratio.
The output is a complete globals.css with color tokens. I review it visually, tweak two or three values, and move on.
Without AI, this takes a full day of manual contrast checking and color adjustment. With AI, twenty minutes.
/* spacing.css - generated and reviewed */
:root {
--space-0: 0;
--space-1: 0.25rem; /* 4px */
--space-2: 0.5rem; /* 8px */
--space-3: 0.75rem; /* 12px */
--space-4: 1rem; /* 16px */
--space-5: 1.25rem; /* 20px */
--space-6: 1.5rem; /* 24px */
--space-8: 2rem; /* 32px */
--space-10: 2.5rem; /* 40px */
--space-12: 3rem; /* 48px */
--space-16: 4rem; /* 64px */
--space-20: 5rem; /* 80px */
--space-24: 6rem; /* 96px */
--text-xs: 0.75rem; /* 12px */
--text-sm: 0.875rem; /* 14px */
--text-base: 1rem; /* 16px */
--text-lg: 1.125rem; /* 18px */
--text-xl: 1.25rem; /* 20px */
--text-2xl: 1.5rem; /* 24px */
--text-3xl: 1.875rem; /* 30px */
--text-4xl: 2.25rem; /* 36px */
--leading-tight: 1.25;
--leading-normal: 1.5;
--leading-relaxed: 1.75;
--radius-sm: 0.375rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--radius-full: 9999px;
}I don't use AI for this. Spacing and type scales are mathematical progressions. I have a template I copy across projects.
The AI's value here is suggesting which sizes to use where. "Use space-4 for component padding, space-6 for section gaps, space-12 for page sections."
I don't build components from scratch anymore. shadcn/ui gives you unstyled, accessible components that you own.
npx shadcn@latest init
npx shadcn@latest add button card input dialogBut shadcn components need customization to match your design system. This is where AI helps:
I'm using shadcn/ui with these design tokens: [paste your tokens]
Customize the Button component variants to match this design system:
- Primary: Uses our primary terracotta color
- Secondary: Uses neutral gray
- Ghost: Transparent with hover state
- Destructive: Uses our error red
- All variants need hover, focus, and disabled states
- Border radius should use --radius-md
- Padding should use --space-2 vertical, --space-4 horizontal
AI generates the Tailwind classes. I paste them into the component. Review visually. Adjust.
Patterns are combinations of components. A login form. A pricing card. A dashboard header.
I describe the pattern in plain English and let AI generate the first draft:
Create a pricing card component using our design system.
Requirements:
- Card with shadow and rounded corners (--radius-lg)
- Plan name (text-xl, bold)
- Price with period (text-4xl for price, text-sm for "/month")
- Feature list with check icons
- CTA button (primary variant for recommended plan, secondary for others)
- "Most Popular" badge for the recommended plan
- Use our spacing tokens consistently
- Responsive: full width on mobile, three columns on desktop
Use shadcn/ui Card, Button, and Badge components.
Use Tailwind CSS with our custom tokens.
The AI generates a complete, usable component. I always need to adjust spacing, fix some alignment, maybe change the visual hierarchy. But I'm refining, not creating from scratch.
Design systems need dark mode from the start. Adding it later is painful.
/* Light mode tokens */
:root {
--background: oklch(0.98 0.005 90);
--foreground: oklch(0.15 0.01 90);
--card: oklch(1 0 0);
--card-foreground: oklch(0.15 0.01 90);
--border: oklch(0.85 0.01 90);
--muted: oklch(0.93 0.005 90);
--muted-foreground: oklch(0.45 0.01 90);
}
/* Dark mode tokens */
.dark {
--background: oklch(0.12 0.01 90);
--foreground: oklch(0.93 0.005 90);
--card: oklch(0.17 0.01 90);
--card-foreground: oklch(0.93 0.005 90);
--border: oklch(0.25 0.01 90);
--muted: oklch(0.2 0.01 90);
--muted-foreground: oklch(0.6 0.005 90);
}Use semantic token names. Never reference specific colors in components. Always reference tokens.
// BAD: Hardcoded colors
<div className="bg-white text-gray-900 dark:bg-gray-900 dark:text-white">
// GOOD: Semantic tokens
<div className="bg-background text-foreground">When you change your dark mode values, every component updates automatically. That's the power of tokens.
Here's my actual workflow for a new project's design system:
Total: About 4 hours. Down from two weeks.
The AI doesn't replace taste. It replaces the mechanical work that comes after taste has made its decisions.
You decide the vibe. AI does the math.

Create comprehensive design systems with Tailwind CSS 4 — custom themes, component patterns, responsive strategies, and dark mode implementation.

Leverage Next.js 16 features with AI integration -- server components, streaming, and the app router patterns that power modern AI applications.

Your AI agent is only as useful as the services it can talk to. Here are the patterns I use to connect AI to everything else.
Stop reading about AI and start building with it. Book a free discovery call and see how AI agents can accelerate your business.