← All articles
AI & ML

Set up Claude Design with Claude Code, from design system to working screen

Import your styles into a design system, design a screen against it, and let Claude Code build the screen from the design's files, not a screenshot.

This tutorial sets up Claude Design with Claude Code, so that one screen goes from your own colors, type and spacing to working code in your repo. You import your styles once, draw the screen with them, and Claude Code builds it from the design’s files instead of a screenshot. There are five steps. In one test run, Claude’s own work took under three minutes, so most of your time goes on reviewing what it made.

Plans, versions and sign-in you need

Check your Claude Code version first. The /design command needs v2.1.265 or later (commands reference).

claude --version

Claude Design now runs inside Claude itself. Since 2026-09-16, Design, Design System and Slides are Artifact types, kinds of page that Claude builds and publishes (release notes, announcement). You can use them from a chat, from Claude Code or from the Artifacts tab. This tutorial uses the Design and Design System types.

  • A Pro plan or higher. Design itself is on every plan, including Free, since 2026-10-08 (announcement). Design systems are not on the Free plan, and they are still in beta (Help Center). Claude Code reads artifacts only on Pro, Max, Ultra, Team or Enterprise (Claude Code artifacts docs).
  • A /login session in Claude Code. Artifacts do not work with an API key, Amazon Bedrock, Google Vertex AI or Microsoft Foundry. They also do not work with customer-managed encryption keys (CMEK), HIPAA settings or zero data retention (ZDR). They are off by default with -p, in the Agent SDK and in the GitHub Action (artifacts docs). The 2026-10-08 announcement says artifacts now support CMEK, so check both pages if your organization uses it.
  • Room in your plan’s usage. Design work counts against the same plan limits as the rest of Claude, Claude Code included (Help Center). So a long design session can leave you less room for coding that day.
  • A repo that defines your colors, type and spacing, ideally as CSS custom properties. Step 1 shows how they are imported.

Note: The standalone site at claude.ai/design closes on 2026-12-14 (Help Center). When you move a project from it into Claude, the design moves, but its chats and comments do not. The standalone copy then becomes read-only, and you cannot undo the move. Before you move, you can export the project as an HTML .zip file at no cost.

How Claude Design with Claude Code works without a screenshot

When Claude Code builds a screen from a design, it reads files. This is the layout of a design with two screens, as the Design type’s instructions describe it. Checkout and CheckoutEmpty are example names.

project/
├── canvas.json
├── Checkout.dc.html
├── CheckoutEmpty.dc.html
└── ds/
    └── <folder>/
        └── tokens.json

The canvas and its artboards

The canvas is the surface you draw on in Claude Design, and project/canvas.json is its index. It records where each artboard, one screen on the canvas, sits (x, y, w, h). It also holds the order of the artboards, the pages, your notes and the design systems the design uses.

This excerpt follows the shape in the Design type’s instructions, with invented values and some keys left out.

{
  "v": 3,
  "title": "Checkout",
  "boards": {
    "Checkout.dc.html": { "x": 0, "y": 0, "w": 1440, "h": 900 },
    "CheckoutEmpty.dc.html": { "x": 1520, "y": 0, "w": 1440, "h": 900 }
  },
  "order": ["Checkout.dc.html", "CheckoutEmpty.dc.html"],
  "notes": {
    "pay": { "x": 0, "y": -300, "text": "The Pay button stays visible on small screens." }
  },
  "designSystems": [
    { "title": "Acme", "namespace": "acme", "artifact": "https://claude.ai/artifact/<id>", "version": null, "copiedAt": "2026-11-18T09:00:00Z" }
  ]
}

Each key in boards is the artboard’s file name, and a sticky note on the canvas is one entry in notes.

Each artboard is its own file, project/<Name>.dc.html. It is a self-contained HTML page with <x-dc> markup. A data-props script in it declares the props you can change on the canvas. So when Claude Code opens Checkout.dc.html, it reads the markup and the exact values.

The design system it draws with

A design system in Claude is a separate artifact that holds your styles and components, and Claude draws with it (Academy tutorial). These are the files you will use most:

  • tokens.json holds your tokens, the named values for color themes, type, spacing and radius. Each group is a list of {name, value, usage} entries.
  • README.md holds rules in plain words. Claude reads it every time it uses the design system, so rules such as “never put two primary buttons on one screen” belong here.
  • components/bundle.js holds every component in one classic script that assigns them to window.<Namespace>. A bundle.css file holds their styles.
  • components/<Comp>/ holds a preview.html and a README.md for each component.

The folder also holds design-system.json (its index), index.d.ts, assets/ and fonts/ (from the Design System type’s instructions). This is one tokens.json entry, as an excerpt with invented values.

{ "name": "accent", "value": "#2f6f4e", "usage": "Primary buttons and links" }

When you start a design, Claude copies the design system into it, at project/ds/<folder>/tokens.json (from the Design type’s instructions). Each design keeps the copy from the day it was made (Help Center). A later change to the design system reaches an older design only when you ask Claude to update it.

 repo ──────── Sync from GitHub ───────▶ design system
   ▲                                          │
   │                                          │ copied into the design
   │ writes code                              ▼
 Claude Code ◀──────── design link ──────── canvas

Figure 1 shows the round trip. Step 1 below is the top arrow. Steps 2 and 3 happen on the canvas. Step 4 is the bottom arrow and the left arrow, and step 5 runs the top arrow again.

Rule: Claude Code builds from the canvas files and the design system’s tokens, so it gets exact values instead of reading them from a picture.

Five steps from design system to working screen

1. Build a design system from your repo

Claude draws with the tokens of the design system you give it. Without one, the values on the canvas do not come from your code, and Claude Code has nothing in your repo to match them to.

In Claude, open the + menu in the message box, choose Design system, then New design system. You get two choices (Academy tutorial).

  • Using Claude opens an empty design system with three cards. Choose Sync from GitHub and pick your repo. Sync imports colors, type, spacing, radii, fonts, logos and docs. It asks which components to bring in, and it asks before it runs your build.
  • Using Claude Code is for a design system that already lives in a repo. Claude Code reads the repo’s tokens and components on your machine.

In the Claude Code route, the request can be one sentence in the repo.

Build a design system called Sage from the CSS custom properties in theme/assets/css/site.css. Bring in the light and dark themes. List every value you skip.

In a large repo, point Claude at the folder that holds your UI (Academy tutorial). A very large repo can make the browser slow. The Help Center suggests that you link it from Claude Code instead (Help Center).

To see how your CSS turns into tokens, take this example file.

:root {
  --accent: #2f6f4e;
  --link: var(--accent);
  --gap-lg: calc(var(--gap) * 2);
}

[data-theme="dark"] {
  --accent: #8fd3ae;
}

The Design System type’s guide for importing from code gives three rules.

  • Each theme selector becomes a theme. :root or a light selector comes first. [data-theme="dark"], .dark and @media (prefers-color-scheme: dark) are read as themes too, so --accent gets one value per theme.
  • A color that points to another becomes an alias. --link: var(--accent) becomes {accent}, a reference to the accent token instead of a copy of its value.
  • Computed values are skipped. --gap-lg uses calc(), so Claude skips it and notes that it did. The same happens to color-mix().

In the test run, the source was a WordPress theme’s stylesheet with a light and a dark block. The design system came out with 24 colors, 6 spacing steps, 3 radii and only 2 text styles. Ten values were skipped. Five of them were font sizes written with clamp(). The page reads a length only as px, rem, em, % or a plain number (from the Design System type’s instructions), so a fluid type scale cannot import.

Open the design system when the sync finishes. Its page has a menu with Overview, Colors, Typography, Spacing, Corner radius, Shadows, Components, Assets and Files. Overview shows a cover and your README.md. Colors is a table with one column per theme. The meta field in tokens.json records where the values came from, in repo, ref, paths and synced.

The import is only as good as its source (Help Center). Values built with calc(), clamp() or color-mix() do not arrive, so add them by hand or keep them out of the design.

2. Draft a screen against the design system

A screen drafted inside the design system starts with your tokens and components. You can start it from Claude Code or from a chat.

In Claude Code, /design followed by a brief drafts artboards and publishes a Design artifact (commands reference). Since v2.1.288, your organization’s design systems are no longer left out when Claude Code starts a design (changelog). In a chat, open the + menu, choose Design system and tick yours. The chip under the message box then shows its name, or “No design system” when none is picked (Academy tutorial).

Give the brief a goal, a layout, the content and the audience (Help Center).

/design A checkout screen for an online shop. Goal: the buyer pays in one step. Layout: order summary on the left, payment form on the right. Content: two items, a total and a Pay button. Audience: buyers on phones and laptops. Use the Acme design system.

The brief names phones on purpose. The Help Center advises that you mention responsive layouts early. The skill takes a while, and when it finishes you have a new Design artifact. You can export each artboard as PNG or PDF.

3. Refine the screen on the canvas

Claude Code builds what is on the canvas. A decision that stays in your head, or only in a chat message, does not reach the code.

Use the tool that fits the size of the change (Help Center).

  • Chat for structure, such as a new section or a different layout.
  • Comments for one component.
  • Direct edits for visual details, such as a color or a gap.

When you are not sure of a layout, ask for two or three variations and keep one. Then prepare the canvas for Claude Code, as the Academy tutorial advises (Academy tutorial).

  • Name artboards and components clearly. Claude Code reads those names in the design, so Checkout tells it more than Frame 3.
  • Ask for the other states. Request the empty, error and loading states, and the screen with tiny and with huge data.
  • Write decisions as notes on the canvas. A sticky note is an entry in the notes field of canvas.json, so Claude Code reads it with the design.

Claude Design has no version history, so duplicate the design before a big change (Help Center). You should now see one named artboard per state, with your notes beside them.

4. Hand the design to Claude Code

The current Claude Design handoff is a link. Claude Code reads the files behind it, so it needs nothing exported.

If you drew the design with /design, stay in the same Claude Code session and ask Claude to build it. If the design was made in a chat, give the developer who builds it edit access. They paste the design link into Claude Code inside the repo (Academy tutorial).

Build the Checkout and CheckoutEmpty artboards from https://claude.ai/artifact/<id> as a page in src/pages/checkout. Use the components and CSS custom properties that already exist in this repo. When you finish, open the page in a browser and take a screenshot. Compare it with the Checkout artboard and list every difference.

The last two sentences are a pass/fail check. The Claude Code best-practices page recommends one, such as a browser screenshot next to the mockup (best practices). The check needs a way for Claude Code to open a browser in your setup. Without one, compare the page with the artboard yourself.

Pause and predict: when Claude Code gets the link, what does it open? An image of the artboard, or something else? Write your answer before you read on.

It opens files, but not on the first read. Claude Code reads the artifact with its Artifact tool and can fetch single files with path or paths (artifacts docs). In the test run, a read of the bare link returned no design at all. It returned the Design type’s instructions, with a line saying the page is left out and the files should be listed first.

The file list explains why. The test design had 37 files, and only 4 of them were the design’s own.

project/canvas.json              680 bytes
project/Main.dc.html            2684 bytes
project/CheckoutEmpty.dc.html   1512 bytes
project/ds/sage/tokens.json     5765 bytes

The other 33 are the editor that draws the canvas, such as artifact-type/app.js at about 4.9 MB. Claude Code then read the project/ files by path and got their full text. The Academy tutorial says Claude builds “from the actual artboards… not from a screenshot” (Academy tutorial). The run shows how it gets there.

So name the files in your request: “Read project/canvas.json and every .dc.html file it lists.” A user report says reads with path failed in Claude Code 2.1.318 to 2.1.323 (issue #107467). If single-file reads fail, check your version against that report.

Note: Claude Design also lists the export options “Handoff to Claude Code”, “Send to local coding agent” and “Send to Claude Code Web” (Help Center). The handoff bundle packs the design files, the chat and a README that tells the model how to read the designs. It comes with a prompt that holds the bundle URL (archived tutorial). Use “Send to local coding agent” when you build with an agent other than Claude Code.

5. Keep the design system in sync with your code

Your code keeps changing after the first sync. If the design system is not updated, new designs get old values.

Resync after each release of your component library (Academy tutorial). A resync updates changed values and keeps the usage notes you wrote. It asks before it deletes tokens that are gone from your code (Academy tutorial). Then open each design you still work on and ask Claude to update its copy (Help Center).

Update this design's copy of the Acme design system to the latest version.

The test run shows what “its own copy” means. It changed one usage note in the design system, which gave the system a new version id. The design’s project/ds/sage/tokens.json kept the old text, byte for byte. Only after the update did the copy hold the new note, and the designSystems record in canvas.json named the new version id. Check that record when a design looks out of date.

Claude Code also has /design-sync, which converts a React design system in your repo (commands reference). Its first run checks every component, and the commands reference warns that this can take a few hours on a large repo.

A system synced with /design-sync carries "editing": "code" and opens read-only for everyone in Claude. To change it, you edit the code and run /design-sync again, and each run replaces the system’s files (from the Design System type’s instructions). Your code is then the only place to change the design system.

Where /design-sync writes is an open question. The commands reference says it uploads to the standalone site, which closes on 2026-12-14. Since v2.1.317, it stops at the start if the design system has moved into Claude (changelog). No primary source names its target after 2026-12-14, so use Sync from GitHub for new design systems.

Ten errors and how to fix them

  • Your fluid font sizes are missing. A length written with clamp() is not one the page can read, so it does not import. Add a fixed size for each step by hand, or ask Claude to pick one per step and record that it did.
  • A dark color shows “Inherits Light” and a contrast warning. A token with no dark value takes its light value in the dark theme. In the test run, the page flagged one such pair at 1.2:1 and offered a “Fix with Claude” button. Give the token a dark value in your CSS and resync.

  • The token file imports, but the design system shows no tokens. Your file is probably in the DTCG (W3C design tokens) format, a map from names to values. The Design System type’s instructions say the page cannot read that format, even though it is valid JSON. Import from your CSS custom properties instead, or ask Claude to rewrite the file as lists of {name, value, usage}.

  • An older design still shows the old token values. Each design keeps its own copy of the design system (Help Center). Ask Claude to update that design’s copy.
  • /design-sync stops before it uploads anything. Since v2.1.317, it stops at the start when the design system has moved into Claude (changelog). Resync it in Claude with Sync from GitHub instead.
  • /design-login fails in CI. It needs a TTY, an interactive terminal, so a headless job cannot run it. This comes from a user report, not from the docs (issue #91063). Run the login and the sync from a terminal on your own machine.
  • Claude Code cannot open the design link. Check how Claude Code signs in. Artifacts need a /login session, and they are off by default with -p (artifacts docs).
  • A big change went wrong, and there is no earlier version. Claude Design has no version history (Help Center). Duplicate the design before the next big change.
  • Two people edit at once, and changes go missing. The sources disagree here. The Help Center says editing at the same time may not work reliably (Help Center). The Academy tutorial says people with edit access can work on the canvas together and see each other’s changes (Academy tutorial). Duplicate the design before a big shared edit, so a lost change costs little.
  • Comments are missing from the page. The Help Center lists this as a known limit. Write decisions as notes on the artboard instead, as in step 3.

When another tool fits better

Each route below turns a design into code. They differ in where the design lives.

Option Use it when Cost or limit
Claude Design with Claude Code You want designs drawn with the tokens from your code. Design systems need a paid plan and are in beta. Claude Design has no image model, and its designer calls it a poor fit for logos, as a personal opinion (blog post).
Figma MCP server Your team designs in Figma. Figma stays the source of truth, with its frames, variables and Code Connect. It does not read a Claude Design canvas.
A screenshot in Claude Code You need one screen, once. Claude Code sees pixels and no design system, so it estimates values.
v0 You want a new app on Vercel. It builds with Next.js, Tailwind and shadcn, so it fits less well if your stack differs.
Lovable You want a new full-stack app. The app is built in Lovable and synced to Git, which suits a new app more than one screen in an existing repo.

The limits in the last four rows are our reading of what each tool does, from its docs. None of those docs states them as costs.

Next, pick a screen your app already has, such as a settings page, and draw its empty and error states against your design system. Then hand them to Claude Code with the same screenshot check.

For further reading, these are the primary sources:

If you want the next tutorial like this one when it comes out, subscribe to the newsletter.

Comments

No comments yet. Ask a question or share what worked for you.

Leave a comment

Write a comment before you post.

Enter your name.

Never shown on the site.

Enter an email address like name@example.com.

Comments are checked before they appear. Fields marked * are required.

Keep reading

Related articles