Skip to content

Modes and brands

A mode is one value on an axis, such as dark on theme: switch it and every mode-aware token re-resolves. A brand is a sparse .ds file layered over your base system. Both change how a design looks without touching a layer. Tokens and syntax are in the design system overview and Authoring.

How do I switch a mode or brand?

In the Design system section at the top of the right panel. It shows the brand, and a Theme switch of Auto, Light and Dark. With nothing selected it sets this canvas; with a selection it sets those elements.

The Design system section: subtitle 1 selected, the brand field reading default, and a Theme switch of Auto, Light and Dark
The Design system section with one element selected.
ControlWhat it does
Brand fieldAuto (inherit), default (pin to the base), then each brand and any library brand. Hovering a row previews it on the canvas; a click commits it.
Theme switchCommits on press. Auto clears the setting and inherits.
Design system settingsThe button beside the brand field opens a page with every other axis, plus Create Design System Viewer and Reset design system, which clears the brand and modes set at this scope.

On that page an axis with two values is a switch with Auto first; any other axis is a dropdown. Each change undoes with Cmd+Z.

A still of the live example. Open this page on a desktop browser with WebGPU to try it.
One scene under one design system, in its opening brand, theme and density
Brand
Theme
Density
Live on a desktop browser with WebGPU. One scene, one design system: switch brand, theme or density and every value the system drives moves at once.

Where does an inherited value come from?

Hover Auto and the tooltip names the value and its source, such as Auto: Light · Inherited from canvas. The brand field adds a quiet suffix, such as default · inherited · Compact, naming what is inherited and what the settings page sets.

Layer, strongest firstSet byTooltip when inherited
The elementThe section, with it selectedThe value is set here, with no tooltip
A parent frameThe section, with the frame selectedInherited from a parent frame
The canvasThe section, with nothing selectedInherited from canvas
The folderAn active block in the folder’s default.dsInherited from folder default
The systemThe first value on each axisDefault value

How does an agent switch them?

With ds() on a frame. Children inherit it, and an element’s own ds() wins over the canvas.

ds() in Blueprint
ds(editorial)               // switch brand
ds(, theme(dark))           // keep the brand, go dark
ds(editorial, theme(dark))  // both
ds(, scheme(bright))        // a custom axis works the same way

What modes ship by default?

Three axes. The first value on each is the default, and each axis switches on its own.

The default axes
modes {
  theme:         [light, dark]
  density:       [comfortable, compact]
  accessibility: [standard, high-contrast, large-text]
}

How do tokens change with a mode?

Each generator carries its own behavior, so one line gives you a mode-aware scale.

GeneratorDefault behavior
boldness(color(...))theme.dark: mirror, accessibility.high-contrast: outward(1)
boldness(number(...))accessibility.high-contrast: shift(+1)
tshirt(number(...))density.compact: shift(-1), accessibility.large-text: shift(+1)
looseness(number(...))accessibility.large-text: shift(+1)
OpWhat it does to a role’s stop
shift(N)Moves it N stops. Shifts add up across active modes
mirrorReflects it around the middle stop
outward(N)Pushes it N stops away from the middle, toward the nearer end

Ops land on your ramp as it stands, so a pinned stop is what a mirror or shift resolves to. A step past the end of a scale clamps to the end.

How do I change that behavior?

Pass transforms: to replace the defaults, listing every entry you want kept, or transforms: none to opt out. Keys here are always axis-qualified.

From the default system, and a custom axis
// Text never shrinks in compact mode
font.size: tshirt(number([12, 14, 16, 20, 24, 32, 36, 40, 48, 64, 80, 96, 128]),
                  transforms: { accessibility.large-text: shift(+1) })

// Corners stay put in every mode
radius: tshirt(number([2, 4, 6, 8, 12, 16, 20, 24, 32, 40, 48, 64, 96]),
               min: { none: 0 }, max: { full: 9999 },
               transforms: none)

// Relist the defaults when you add an axis
modes { brand-variant: [refined, playful] }
accent: boldness(color(#FF6B00),
                 transforms: {
                   theme.dark:                  mirror,
                   accessibility.high-contrast: outward(1),
                   brand-variant.playful:       shift(+2),
                 })

How do I give a brand color its own dark value?

Give the seed a dark: color. The dark ramp is generated from it, and roles still mirror on top. mirror alone reuses the light ramp in dark. Write this one in the file; picking a dark color on the Colours page is coming soon.

A dark seed
primary: boldness(color(#0080FF, dark: #66B2FF))

How do I set one token per mode?

Use a block. $default is the fallback, and a key may be a bare value, a qualified path or a combination.

Per-mode branches
color.surface { $default: neutral.hint, dark: neutral.intense }

color.text.primary {
  $default:                    neutral.bold
  accessibility.high-contrast: neutral.intense
  theme.dark, density.compact: neutral.subtle
}

typography.h1 {
  $default:        { fontSize: font.size.3xl, fontWeight: font.weight.bold, lineHeight: 1.2 }
  density.compact: { fontSize: font.size.2xl }
}

A combination fires only when all its modes are active. A record branch names only the fields that change; a list replaces the base list. A hex may carry alpha (#FFFFFF00), and that color token then owns the alpha of every paint bound to it, which is how a token goes transparent in one mode.

How do I edit modes in the Design system editor?

Open the Modes page under System in the rail. It lists each axis and its modes, then only the tokens that differ from the default mode.

The Modes page of the Design system editor: light as the default, dark following it, a Differs in dark list of three tokens, and a Follows light row
The Modes page: three tokens differ in dark, and the rest follow light.
  1. Add mode… Adds a value to the axis. It follows the first mode until a token gives it a value.

  2. Differs in dark Each token with its own value here. Auto removes that value, so the token follows again.

  3. Follows light The count of everything else. Show lists them.

Remove… sits in the … menu on a mode. Removing a mode removes every value the file gives a token in it, after a confirmation, and you can undo it. A mode name is one word. To add a new axis, write it in the modes block with View as file.

How do I add a custom axis?

Declare it in the modes block. Each axis is independent, so a layer can be theme.dark, contrast.high and motion.reduced at once.

Custom axes
modes {
  theme:    [light, dark]
  contrast: [normal, high]
  motion:   [auto, reduced]
}

color.text.primary {
  $default:      neutral.bold
  contrast.high: neutral.950
}

A branch key can be the bare value or the qualified form, and both resolve the same. Qualify a custom value that shares a spelling with another axis: a bare dark is always the theme value. An alias on a custom axis can point at a token themed on another axis, and it stays aware of both. Custom axes appear in Design system settings.

How do I add a brand?

Add a .ds file next to default.ds and declare only what differs. Tailwind palettes, text styles and every other alias come from the base.

Styles/acme.ds
primary:     boldness(color(#FF6A00))
font.family: Inter

color.primary { $default: primary.firm, dark: primary.subtle }

Each brand gets its own resolved file at Styles/.gen/acme.gen.yaml, holding the merged result. An agent creates the same file through a ds fence, and a later bl fence in the edit can use it straight away with ds(acme).

To use a brand onDo this
Elements or a frameSelect them and pick the brand in the Design system section
One canvasSelect nothing and pick the brand
A folder and belowWrite an active block in the folder’s default.ds
An agent’s workName it on the edit, or switch the chat’s design system in the composer picker
A library’s systemPick @acme/design-kit, or @acme/design-kit/marketing for a named brand. It resolves against the library’s own tokens
The default brand for a folder, in its default.ds
active {
  brand: acme
  modes: { theme: dark }
}

How do I remove something a brand inherits?

Use unset. A wildcard strips a branch from every semantic, which makes a light-only brand two lines.

A light-only brand
primary: boldness(color(#FF6A00))
unset {
  *.dark
}

Can a brand stand alone?

Yes. inherits: none stops it layering on default.ds, on the canvas and in its generated file alike. It must then declare everything it uses.

Styles/standalone.ds
inherits: none

primary: boldness(color(#000000))
neutral: boldness(color(#888888))

How does a design system cascade across folders?

Like .editorconfig. A sub-folder can hold its own Styles/default.ds, and Brilliant merges from the project root down, with the nearest file winning field by field.

Two levels
my-project/
  Styles/
    default.ds        // project-wide
    acme.ds
  Marketing/
    Styles/
      default.ds      // overrides for this folder
    Hero.bl           // uses both
  Internal/
    Styles/
      default.ds      // root: true, its own system
    Dashboard.bl

Put root: true in a file to stop the walk there, so that folder keeps a self-contained system.

Where next?