← Back to Docs

How It Works

Under the hood, Design Grab uses a multi-stage pipeline to go from a live website to a structured design system file.

DOM Capture

The Chrome extension injects a capture script into the active tab. This script walks the entire DOM tree and records every element's computed styles — including fonts, colors, spacing, borders, and layout properties. The result is a structured JSON representation of the page.

HTML Rendering

The captured data is sent to the local server which renders it into a pixel-perfect HTML replica. This rendered HTML preserves all visual properties with inline styles, making it easy to inspect and extract values.

Design Token Extraction

The design extractor analyzes the rendered HTML across all captured pages for a site. It identifies recurring patterns — color values, font stacks, type scales, spacing rhythms, border radii, and component structures — and organizes them into a coherent design system.

design.md Generation

The final output is a structured Markdown file containing the complete design system: color palette with usage tokens, typography scale with exact values, component patterns with code snippets, layout guidelines, and dos/don'ts for accurate reproduction.

What you get

  • Complete color palette with semantic token names
  • Typography scale with font families, sizes, weights, and spacing
  • Component code snippets (buttons, cards, nav, footer)
  • Layout system measurements (max-width, padding, gaps)
  • Border radius and shadow definitions
  • Design language description and guidelines
← Previous: Getting Started