Once UI Blog
Builder stories
Posts
Once UI
Design tokens your agent can follow
How coding agents read the Once UI component catalog
AGENTS.md for design systems
What is an agentic design system?
Once UI 2.6: it thinks in a cube
Once UI Stack chat: an AI chat with a face
Once UI 2.5: reactions that move
Once UI 2.4: ready for AI apps
Once UI 3.0 beta: one way to say it
Stack languages: your app in Hungarian, or in two
Stack store: your shop on your own site
Liquid Metal: chrome that never sets
Chirio, redesigned
Styled screenshots in Chirio
Once UI 2.3: made for real apps
Frametic is now a video and capture studio
Agents write about 40% less code from Stack
Magic Portfolio, now on Once UI 2
Frametic MCP: let your agent film your site
Once UI Stack: your site as a desktop app
Once UI Stack, redesigned
Stack: teams and billing
Prism Glow: soft prism light behind your sign-in screen
Once UI for React Native: the same props on a phone
Once UI 2.2: chat, forms and mobile
Dither: your own image or video as a dithered print
Once UI 2.1: The pieces apps kept asking for
Once UI 2.0: A system an AI can build with
What made Once UI 2.0 possible
Once UI 2.0 alpha: Measured, not assumed
Colour arrives in pairs
Once UI 1.8: Polish as a feature
Once UI 1.7: Form with Intent
From products to systems: a new service model
Magic Journal: A different medium for long-form writing
Supa Social: The next milestone of our journey
Once UI is open source. Here's how we plan to keep it that way.
Designing a timeless, AI-native brand
Once UI 1.5: Curiosity in code
Once UI 1.4 migration guide: The breakpoint object
Launching in the AI-native era: A guide for indie builders
The first design system for indie builders
Builder Stories
Side and Once UI: From café website to reservation system
SatisPro and Once UI: Scaling smarter review management
IQON and Once UI: Scaling with a design system
Dev: Blending science and code with Once UI
JExcellence and Once UI: Turning experiments into enterprise apps
OsmyReal: Launching a platform for mobile gaming with minimal coding
TrademarkTrademark
Ctrl k
Search…
Sign up
Once UI Blog
Builder stories
Posts
Once UI
Design tokens your agent can follow
How coding agents read the Once UI component catalog
AGENTS.md for design systems
What is an agentic design system?
Once UI 2.6: it thinks in a cube
Once UI Stack chat: an AI chat with a face
Once UI 2.5: reactions that move
Once UI 2.4: ready for AI apps
Once UI 3.0 beta: one way to say it
Stack languages: your app in Hungarian, or in two
Stack store: your shop on your own site
Liquid Metal: chrome that never sets
Chirio, redesigned
Styled screenshots in Chirio
Once UI 2.3: made for real apps
Frametic is now a video and capture studio
Agents write about 40% less code from Stack
Magic Portfolio, now on Once UI 2
Frametic MCP: let your agent film your site
Once UI Stack: your site as a desktop app
Once UI Stack, redesigned
Stack: teams and billing
Prism Glow: soft prism light behind your sign-in screen
Once UI for React Native: the same props on a phone
Once UI 2.2: chat, forms and mobile
Dither: your own image or video as a dithered print
Once UI 2.1: The pieces apps kept asking for
Once UI 2.0: A system an AI can build with
What made Once UI 2.0 possible
Once UI 2.0 alpha: Measured, not assumed
Colour arrives in pairs
Once UI 1.8: Polish as a feature
Once UI 1.7: Form with Intent
From products to systems: a new service model
Magic Journal: A different medium for long-form writing
Supa Social: The next milestone of our journey
Once UI is open source. Here's how we plan to keep it that way.
Designing a timeless, AI-native brand
Once UI 1.5: Curiosity in code
Once UI 1.4 migration guide: The breakpoint object
Launching in the AI-native era: A guide for indie builders
The first design system for indie builders
Builder Stories
Side and Once UI: From café website to reservation system
SatisPro and Once UI: Scaling smarter review management
IQON and Once UI: Scaling with a design system
Dev: Blending science and code with Once UI
JExcellence and Once UI: Turning experiments into enterprise apps
OsmyReal: Launching a platform for mobile gaming with minimal coding
Guide

Design tokens your agent can follow

An agent drifts off your scale when the code lets it write any value. Once UI tokens are props with a fixed set of values, so an agent can't pick a spacing or a colour that isn't in the system.
Updated 56 minutes ago
How coding agents read the Once UI component catalog
Sponsored
Aveiro
aveiro.app
Sponsored
Aveiro
aveiro.app
TrademarkTrademark
Once UIDocumentationBlog
© Once UI. All rights reserved.
Built with Aveiro
Most design drift from coding agents comes down to one thing: the code lets them write any value. A style prop takes any number of pixels. A utility class system takes any arbitrary value in square brackets. A colour can be any hex code. The agent picks something close, and close is how a product slowly stops looking like itself. Tokens fix that, but only if the agent can't step around them.

Tokens as props, not as a suggestion

In Once UI, spacing, colour, radius and type are props with a fixed set of values. Spacing takes the tokens in the scale ("4", "8", "12", "16", "20", "24", "32", "40" and up) and nothing in between: there is no "6" and no "10". Colours are a scheme and a weight, like brand-medium or neutral-alpha-weak, never a hex value. An agent writing this can't drift off the scale, because there is nowhere off the scale to write. When the type checker knows the values, a made-up token is a compile error instead of a subtle visual bug.

Colour in pairs

Text colour in Once UI is onBackground, and it is meant to pair with the background behind it: onBackground="neutral-weak" on a neutral page, onSolid on a solid fill. An agent that follows the pairs gets readable contrast in both themes without ever looking at a colour value. We wrote more about this in Colour arrives in pairs.

The rules agents actually break

The compact rules file that ships with Once UI has a table of what to write and what never to write, built from the mistakes agents make most. Two of them are about tokens:
  • width="32" is 32 pixels, a spacing token. width={32} is a number, which means rem: 512 pixels. Agents mix these up constantly, so the rule says it plainly.
  • Inline SVGs use currentColor or a CSS variable such as var(--brand-solid-strong), never a raw colour, so icons follow the theme too.
Rules like these are short, but without them an agent has no way to know.

The theme stays in one place

Because every screen refers to tokens, the theme lives in one config file: the brand and neutral scales, the page and surface colours, the border style. Change it there and every screen an agent ever wrote follows. Nothing has to be found and replaced, because no screen ever held the value itself.

Try it

The token values are in ai/tokens.json inside the package, and the docs for AI coding agents show where each file fits. What an agentic design system is covers the rest of the picture.
Read the agent docs
<Column background="surface" border radius="l" padding="24" gap="16">
  <Text variant="label-default-s" onBackground="brand-medium">Pro</Text>
  <Heading variant="heading-strong-l">Everything in Stack</Heading>
</Column>