January 10, 2026 · 12 min read
Copy a Website's Design System With AI
Extract colors, typography, spacing, and component patterns from a public page into prompts Tailwind, CSS variables, and coding agents can implement.
Design systems are more than a color picker
Copying a website’s look means capturing roles: primary action color, muted text, surface elevation, border treatment, type scale for H1 through caption, and spacing rhythm between sections. Screenshots hide those roles behind lighting and compression.
LinkToPrompt’s Design mode reads public HTML and associated style hints—inline styles, class names, and linked CSS when present in the initial response—and organizes them into a prompt-friendly summary. Use https://linktoprompt.com or /#tool on the same URL you would open in DevTools, then edit the tokens before sending them to an AI tool.
Extraction is honest but incomplete: it does not run the full browser, does not see computed styles from complex JS themes, and does not store your URL. Treat output as a draft token file, not authoritative brand guidelines from the owner of the site.
From extracted hints to a token table
Open the Design mode markdown and sort values into semantic names: `color-primary`, `color-text-muted`, `surface-elevated`, `radius-card`, `font-display`, `font-body`. Rename hex codes you do not recognize into roles by how they are used in the HTML (buttons vs paragraphs).
Build a type ramp: map heading tags and prominent classes to pixel or rem sizes when the extractor surfaced them. If sizes are missing, note “infer from h1/h2 hierarchy only; do not invent a full modular scale.”
Spacing is often implicit in padding classes (`p-4`, `gap-8`). List the recurring values as a spacing scale proposal. Ask the model to implement tokens first, components second—prevents one-off margins on every section.
For structural rebuilds that must match layout, pair this file with How to clone a web app UI with AI or rebuild landing page prompts.
- Semantic color names tied to usage, not raw hex alone
- Font stacks with fallbacks
- Border radius and shadow levels as discrete steps
- Breakpoints only if present in class names or media hints
Prompting Tailwind and CSS variables
Ask the agent to output `tailwind.config` theme extensions and a `globals.css` with `:root` variables sourced from the token table. Require that utilities reference variables, not scattered hex literals.
Include contrast notes: “primary on white must meet WCAG AA for body text; if not, darken primary in tokens.” Models rarely self-check contrast unless asked.
Component recipes come after tokens: “Card uses `surface-elevated`, `radius-card`, `shadow-md`, padding `space-6`.” One recipe block per component type beats vague “make cards look like the site.”
When starting from any URL, How to turn any website into an AI prompt explains mode selection and cleanup before you focus on tokens.
Typography and iconography
If the page loads fonts via Google Fonts link tags, the extractor may list family names. Confirm licensing before shipping the same families in production; substitute open alternatives in the prompt if needed.
Icon sets may appear only as SVG paths or icon font classes. Tell the model which library to use (Lucide, Heroicons) or to inline SVG placeholders with `aria-hidden` where decorative.
Line height and letter spacing are easy to lose. Add explicit values when you see cramped marketing headlines in the reference.
For chat-only exploration of tone before implementation, run Context mode and read Website-to-prompt for ChatGPT and Claude.
States: hover, focus, disabled, error
Brand perception lives in interaction states. The initial HTML may only show default buttons and inputs. Extend the prompt with required states: hover darkening, focus ring color and offset, disabled opacity, error border and message text style.
Form fields are a frequent mismatch: reference sites hide validation behind submit. Ask the agent to implement error styles using semantic tokens (`color-danger`, `ring-danger`) rather than hard-coded reds.
Links need visited and active treatments if marketing copy depends on inline links in body text. One paragraph in the prompt prevents electric-blue defaults.
Dark mode may not appear on the reference at all. Either declare “light only v1” or supply a minimal dark token table derived from light roles—inversion rules, not re-scraping.
Components without copying trade dress
A design system prompt should separate patterns from branded skin. Request neutral component names (`MarketingHero`, `PricingTable`) and your own brand colors in the token table unless you have rights to clone the reference brand.
Document what you intentionally did not copy: distinctive illustrations, mascot, custom iconography. Reduces legal and product confusion later.
Validate in Storybook or a style guide page before rolling tokens across an app. One sandbox route is enough for early review.
Dark surfaces and marketing gradients
SaaS landing pages often use mesh gradients and glass panels that do not show up as simple hex values. Describe them in the prompt as layered linear-gradients with angles, or attach a screenshot for human implementation while tokens cover solid roles.
Glass effects need blur radius, background alpha, and border highlight tokens (`surface-glass`, `border-glass`). Without them, agents substitute flat gray panels.
Marketing sections may break the 8px grid with oversized display type. Allow one-off spacing tokens for hero bands (`space-hero-y`) so the rest of the scale stays consistent.
Video backgrounds and autoplay loops are out of scope for HTML extraction; note `HeroMedia` as a static poster image unless you provide an asset URL separately.
Maintenance and drift
Websites change CSS often. Record the URL and date in your token file header. Regenerate Design mode output when the reference refreshes and diff hex and font changes.
Keep prompts modular: `tokens.md`, `components.md`, `pages.md` so you are not pasting a megaprompt into every session.
Use Prompt engineering for AI coding tools to add verification steps: “Storybook stories exist for Button, Card, Input using only theme tokens.”
Copying a design system with AI is iterative measurement: extract hints, name roles, implement tokens, review in UI, adjust. LinkToPrompt shortens the first step; you own the semantic layer that makes the system portable.
FAQ
Does Design mode see computed CSS from JavaScript themes?
No. It works from the initial HTML and styles available without full browser execution. Complex themes may need manual DevTools notes added to the prompt.
Can I paste tokens into Figma plugins via AI?
Yes, as text. Ask chat models to format tokens as JSON or Figma Variables-compatible tables from your cleaned Design output.
Will extracted colors match production exactly?
Unlikely. Anti-aliasing, image overlays, and missing stylesheets cause drift. Use extraction as a starting point and verify on your target background colors.
Should I combine Design and Rebuild modes?
For full page reproduction, yes. Design handles look; Rebuild handles section structure.
Does LinkToPrompt save my design prompts?
It is designed not to store URLs or generated results server-side. Save tokens in your repo or design tool.
Try LinkToPrompt
Paste a URL and generate a rebuild, design, context, or custom prompt in seconds.
Open the tool