Author a design system
Author a design system in the Design system editor, in the .ds file, or through an agent. All three write the same file. This page covers what each editor page does and the complete .ds grammar. New here? Start with the design system overview.
What can I edit in the Design system editor?
Open the Project tab and choose Design system, or click a .ds file in Files. Every token the file holds has a row on one of these pages. A project with no system yet shows No design system yet there, and Open creates it.
| Page | It shows | You can |
|---|---|---|
| Colours | One card per brand color, with its 9-step ramp. Colors on the hide: list sit under More colours. | Change… the color. Click a step to pin it; the reset glyph on a pinned step unsets it. Soft, Standard or Bold on the Ramp row sets how far the ramp reaches. |
| Roles | What designs bind: each role, the step it points at, its light and dark swatches. | Change… opens the step picker. Hovering a step previews the page; choosing one writes it. |
| Scales | Spacing, radius and stroke, every step with a live preview. | Type a value to pin a step; the reset glyph returns the generated value. Change… sets how far a scale moves in a mode such as Compact. |
| Type | The font family, every text style drawn in its own style, and the font scales. | Change… opens the font picker. Style properties edits a style: Family, Weight, Size, Line height, Letter spacing. |
| Effects | Shadows, each previewed on a card. | Add shadow. Select one to edit its layers: X, Y, blur, spread, color, opacity. Add layer, Duplicate layer, Remove layer. |
| Modes | Each axis and its modes, then only the tokens that differ. | Add mode…, Remove…, and Auto to send a token back to following. See Modes and brands. |
| View as file | The .ds text in the code editor. | Edit anything. View as editor brings you back. |
The … menu on a row holds the same four acts on every page.
| Act | What happens |
|---|---|
| Rename… | The dialog says how many places use the token. They all follow the new name. |
| Where used | A count per canvas. Click a row to open that canvas with its layers selected. |
| Duplicate | A copy under a free name. To add a color, duplicate a card and change it, or add one line in the file. |
| Delete… | Layers that use the token keep today’s value as a raw value. You can undo this. |
Each edit is one undo step with an Undo toast. Past 40 tokens a page offers All, Changed and Unused filters, and Unused can delete in one go. The color picker’s + New token also saves the current color as a token, one line in the file.
A system that comes from a library is read-only here. Edit a copy gives you your own version, which stops receiving library updates; Update to a newer release appears when one exists.
What does a .ds file look like?
A version stamp, then statements. This is a shortened version of the default file every new project gets.
ds:v1
// Comments like this reach the AI as it designs. Brief it the way you'd
// brief a teammate: the intent behind a value, when to reach for it.
modes {
theme: [light, dark]
density: [comfortable, compact]
accessibility: [standard, high-contrast, large-text]
}
primary: boldness(color(#0080FF))
neutral: boldness(color(oklch(55.6%, 0, 0)))
spacing: tshirt(number([4, 8, 12, 16, 24, 32, 48, 64, 96, 128]),
min: { none: 0 })
color.surface: neutral.hintComments are // for a line and /* */ for a block; # always starts a hex color. A single-word font can stay bare (Manrope); a name with a space needs quotes ("Noto Serif").
Which generators are there?
Two generators make raw stops, and three wrap those stops in role names.
| Generator | Kind | Output |
|---|---|---|
| color( | Primitive | 11 stops, .50 to .950, on an OKLCH lightness ramp. The seed is .500. Hex or oklch( |
| number([a, b, c]) | Primitive | Your list, stops named .1, .2 and on |
| number( | Primitive | count values from seed. linear(), linear( |
| number( | Primitive | count values across the range |
| boldness( | Semantic | 9 roles, hint to intense. A list maps by position |
| tshirt( | Semantic | xs, sm, md and on. A list maps by position; a long linear scale gets picked stops |
| looseness( | Semantic | 6 roles, none to loose |
primary: boldness(color(#0080FF))
red: boldness(color(oklch(63.7%, 0.237, 25.331)))
spacing: tshirt(number([4, 8, 12, 16, 24, 32, 48, 64, 96, 128]), min: { none: 0 })
font.weight: boldness(number([100, 200, 300, 400, 500, 600, 700, 800, 900]))
font.lineHeight: looseness(number([1.0, 1.25, 1.375, 1.5, 1.625, 2.0]))
opacity.steps: number(range(0, 1), 21, linear())| Argument | On | Does |
|---|---|---|
| min: and max: | tshirt, boldness | Add named stops at either end |
| transforms: | tshirt, boldness, looseness | Replace the mode behavior, or transforms: none to opt out. See Modes and brands |
| reach: soft or bold | boldness( | Moves how far the ramp’s light and deep ends go; .500 stays the seed. The editor’s Soft, Standard, Bold writes it |
| dark: | color( | The seed’s own dark color: the dark ramp is generated from it |
radius: tshirt(number([2, 4, 6, 8, 12, 16, 20, 24, 32, 40, 48, 64, 96]),
min: { none: 0 }, max: { full: 9999 },
transforms: none)
accent: boldness(color(#E5484D), reach: bold)
brand: boldness(color(#0080FF, dark: #66B2FF))A bare hex is one frozen value with no ramp and no dark flip. Give a color role boldness(color(...)) first, then point the role at a step.
How do I write aliases and references?
Write the target path as the value. A reference can point at a role, a raw stop, a composite or another alias, and the chain resolves to a final value.
color.surface: neutral.hint // follows neutral.hint in every mode
color.shadow: neutral.950 // a raw stop: never flips
color.quaternary: quaternary.mid
font.family.sans: font.family // same face, one homeInside a .ds file a reference has no $. The $ is how a layer names a token in the Blueprint DSL ($color.surface).
How do I override one value?
Declare the stop or the mode branch on its own. An explicit stop beats the generated one, wherever it appears in the file or a brand.
| To | Write | Effect |
|---|---|---|
| Hand-pick one stop | primary.300: #B8B9D6 | Every mirror or shift that lands on that stop uses your value. The editor calls this pinning |
| Set a value per mode | A block with $default and mode keys | $default is the fallback; each key wins in its mode |
| Fire on a combination | theme. | Applies only when all listed modes are active |
| Add a one-off token | Any new name, such as color. | It appears in pickers and resolves like the rest |
color.text.primary {
$default: neutral.bold
dark: neutral.faint
density.compact: neutral.firm
theme.dark, density.compact: neutral.subtle
}
color.surface { $default: neutral.hint, dark: neutral.intense }How do I write composites?
A composite is a record of property paths, or a list of shadow layers, under any name.
| Path group | Paths |
|---|---|
| Text | fontFamily, fontSize, fontWeight, lineHeight, letterSpacing |
| Element | opacity, radius, gap, padding |
| Lists | fills, strokes, effects |
typography.code: { fontSize: font.size.sm, fontWeight: font.weight.soft,
lineHeight: font.lineHeight.normal, fontFamily: font.family.mono }
shadow.md: [
drop(y: 2, blur: 4, spread: -1, color: rgba(0, 0, 0, 0.06)),
drop(y: 4, blur: 6, spread: -1, color: rgba(0, 0, 0, 0.10)),
]
shadow.pressed: [ inset(y: 1, blur: 2, color: color.shadow) ]
card.elevated: { fills: [ color.surface ], effects: [ shadow.md ], radius: radius.md }
card.elevated { $default: { effects: [ shadow.md ] }, dark: { effects: [ ] } }A layer takes x, y, blur, spread and color: drop(...) for a drop shadow, inset(...) for an inner one. A mode branch names only what changes. On a layer, a composite binds as a bare token after its other properties: $card.elevated.
What other statements can a file hold?
These set up axes, defaults and picker order. All of them are top-level except $type:, which sits inside a token’s block.
| Statement | What it does |
|---|---|
| modes | Declares axes. The first value on each is the default |
| active | The default brand and modes for this folder and below |
| hide: | Tucks tokens out of menus; in the color picker they sit under More colours. They still resolve. A bare name covers its ramp steps; name.* covers everything under it |
| pin: | Floats tokens to the top of pickers, in this order |
| unset | Drops inherited entries. The wildcard form drops that branch from every semantic. A path with no match warns instead of failing |
| root: true | Stops the walk up parent folders at this file |
| inherits: none | Makes a brand file stand alone instead of layering on default. |
| $type: | Sets a token type explicitly, for a value no name prefix classifies |
modes { brand-variant: [refined, playful] }
active { brand: acme, modes: { theme: dark } }
hide: red, orange, stone.*
pin: primary, color.primary, color.surface
unset { color.primary, primary.300, *.dark }
root: true
inherits: none
copy.cta { $type: string, $default: "Get started" }How does an agent write to the design system?
Through a ds fence in its edit. The first row names the file, the body declares only what differs from default, and the fence merges into that file statement by statement before the fences after it run.
file("Styles/fintech-warm.ds")
primary: boldness(color(#1976D2))
success: boldness(color(#1AAB7A))
color.success: success.firm
font.family: "Noto Serif"Name a new file for its visual direction, in kebab-case. In the in-app chat each edit shows one line, such as Edited the design system: 3 spacing tokens, with Undo, and Revert on the turn takes it back. Connect your agent to do the same over MCP, or use the built-in AI.
What happens when a file has an error?
The design keeps rendering against the last version that parsed, and a notification names the file with an Open button that goes to the first error. Fix the file and the notification clears itself.

While a file is broken, the editor pages are read-only and show the same warning with View as file. A .ds an agent writes by any route, a shell command included, is checked and refused with the line and the first error if it would not load.
What should I write out by hand?
Values: a .ds file has no arithmetic or string templates, so write the number you want.
Stop names: use a word (radius.hairline: 4). A name segment like 0.5 reads as a decimal.
Shared values: use the folder cascade to share tokens across files, as Modes and brands explains.
Where next?
Check every shipped name and value: Tokens.
Add axes, branches and brands: Modes and brands.
See how layers reference tokens: the Blueprint DSL.
Run a system for a team: Design system leads.