How to Build a Design System From Any Reference Website

You found a website whose visual design you love. The colors are perfect, the typography feels right, the spacing is clean. How do you turn that visual inspiration into a reusable design system for your own projects?

This guide walks through the process — from extracting visual data to organizing it into a structured system that you and your AI coding agent can use.

Step 1: Extract the visual foundation

Start by capturing the raw visual data from your reference site. Focus on these five categories:

Manual extraction is possible with browser DevTools, but it is slow and error-prone. DesignSaver automates this step — paste a URL and get all five categories extracted into structured files instantly.

Step 2: Define token naming conventions

Before organizing your tokens, decide on a naming convention. Good token names are descriptive, hierarchical, and consistent. The most common convention is:

{category}-{property}-{variant}
--color-primary-base
--color-surface-raised
--space-padding-md
--font-size-heading-1
--radius-button-md

This naming makes it easy for both humans and AI agents to understand what each token controls.

Step 3: Write DESIGN.md — the human layer

A design system is more than values. It needs rules and intent. DESIGN.md captures the "why" behind the tokens. Include:

Step 4: Structure tokens for AI consumption

AI coding agents parse structured data more reliably than natural language. Organize your tokens in JSON format with clear categories:

{
  "color": {
    "primary": "#6c5ce7",
    "surface": "#0c0e14",
    "text": "#e6e8ee"
  },
  "typography": {
    "fontFamily": { "body": "Plus Jakarta Sans, system-ui, sans-serif" },
    "fontSize": { "h1": "40px", "body": "16px", "small": "14px" }
  },
  "spacing": {
    "base": "8px",
    "section": "80px",
    "cardPadding": "24px"
  }
}

Step 5: Generate platform-specific outputs

A good design system works across platforms. From your base tokens, generate:

DesignSaver generates all of these automatically from any URL. You get CSS, Tailwind config, tokens.json, DESIGN.md, and agent prompts in one export.

Step 6: Version control and iteration

Your design system is a living document. Keep the DESIGN.md and token files in your repository. Update them as your visual identity evolves. Every time you update these files, your AI agent's output updates too — no prompts needed.

Join the DesignSaver beta


Related articles