Lumen
Warp's design system
Three decisions
Three UI systems were running at once, and nobody owned any of them
Many of Warp's customers were selling their shipments through Shopify and already working in places like Slack, so Warp decided to go where they were, with apps for those platforms and for mobile, instead of asking people to open our product and book there. That meant shipping a lot of products at once, so before we made a design system I ran an audit, looking at the new products I was taking on and at the ones our engineering team had designed and our founders had brainstormed, which is where I found three UI systems running side by side, each with its own green, and buttons, spacing and fonts that didn't match from one product to the next either. Each of them made sense when it was made, because somebody needed to ship and there was no convention to copy, so they invented one, and three of those side by side told me nobody had ever been given the job of looking after how our products look.
#36B37E#00FF03#4ADE80
#00FA8ALumen has one green, and it saves it for the thing you're there to do, like the main button, so that when it shows up it always means the same thing.
How it was made
Go where customers are
- February
Warp decided to go where they were, with apps for those platforms and for mobile, instead of asking people to open our product and book there.
Company-wide audit
- February
Before we made a design system I ran an audit, looking at the new products I was taking on and at the ones our engineering team had designed and our founders had brainstormed.
Lumen is one single source of truth that every product could read from.
Green changes once
- May 4
It did change once, from the lime in Warp's own CSS to the Spring Green it is now.
No white on green
- May 5
I'd said from early on that no green button in the system should have white text.
Two decisions dated May 20
The glow decision and the missing-name fix are both dated May 20.
Green glow removed
- May 20
I saw it on the actual button and decided the green shouldn't appear in any shadow at all.
- At the same time
Missing text name fixed
- May 20
Lumen has since added the missing name, and a rule that flags a missing name like that one, with a hint on what to use instead.
Two decisions dated September 27
The tracking-page decision and the loading-to-done fix are both dated September 27.
Tracking page as the base
- September 27
The look comes from Warp's tracking page, which is the page I set as the base.
- At the same time
Loading-to-done fix
- September 27
When a button goes from loading to done, filming it frame by frame showed a blank green frame between the spinner and the check, so the old label now leaves in 80 milliseconds and the new one arrives in 180.
One file per component
- September 28
A component's facts used to be written down in three places, and they had drifted apart, so now one JSON file holds them.
I made one source that every product could read, and didn't restyle each one
There were two ways to go, and I could have restyled each product to one green, and at that point we didn't even have that many products. I didn't, because the three systems used different conventions underneath, so a restyle would only have painted over the cracks. So Lumen is one single source of truth that every product could read from, the one that would actually help us in the future too. In it, a color called green-500 tells you what it looks like, while a color called text.success tells you when to use it, and I named them by the job because the green might change and the job wouldn't, and it did change once, from the lime in Warp's own CSS to the Spring Green it is now, and the rule that it has one job stayed the same.
Light and dark
- Fill
button.intent. primary. background. rest color.action. primary. bg. rest color.accent. 500
#00FA8A- Label
button.intent. primary. foreground color.action. primary. fg color.accent. fg
#07120D- Edge
button.intent. primary. border color.action. primary. border
transparent
It takes discipline to keep each component pointing at a job, and some component tokens still point straight at a raw color.
Lumen has 1,491 tokens, counted from its build output.
I'd approved a green glow on the main button, and then I took it out
For a while the main button had a green glow around it that said "this is Lumen", and I'd approved the rule that allowed it. Then I saw it on the actual button and decided the green shouldn't appear in any shadow at all, because a glowing green was a second job for the one color that's only supposed to have one. I wrote the cost down at the time, that people may recognize Lumen a little less without it. Every green shadow went neutral in one change, and the check that watches shadows now looks at every shadow, so when it's run it flags a green in any of them.
Light text on the green measures 1.12 to 1, so I defined a rule that fails when it finds one
Light text on this green measures 1.12 to 1, which you basically can't read, while dark ink on the same green measures 13.7 to 1.
– to 1
What the text looks like when it falls back to the page's light color. This is not Lumen's primary button.
Lumen's primary button: dark ink, – to 1
Lumen once had six names for the text that sits on the green, and five of them were right. The sixth was a lookalike, and anyone who picked it got green text on the green button, with nothing to warn them. The name you'd naturally guess for it didn't exist at all, so the text quietly fell back to the page's own text color, which on a dark page is light. The checks Lumen had then only looked for names that had been retired, so nothing noticed either one. Lumen has since added the missing name, and a rule that flags a missing name like that one, with a hint on what to use instead. I'd said from early on that no green button in the system should have white text, so there's a rule that flags any green button that has it, and I defined 12 lint rules for Lumen in all, covering things like spacing that's off the grid and green showing up in a shadow, and each one exits non-zero when it's run and finds the mistake. I didn't want any of it to depend on people remembering the rules, since a rule that's only written down gets forgotten by the next person, so each rule says what to fix, and a check only counts once it has failed on a planted mistake.
Here's the shadow rule catching a green put back on purpose:
[lint:shadow-no-accent] ✖ 1 violation(s):design-system/01-tokens/semantic/shadow.tokens.json @ shadow.kbdcolor: {color.alpha.accent.32}shadow token "shadow.kbd" references accent color "{color.alpha.accent.32}". Per AGENTS.md hard rule 20 (v0.14 R11), no shadow color value may be green. Replace with a neutral alpha (color.alpha.shadow.* / color.alpha.paper.* / color.alpha.ink.* / color.border.frame / color.border.strong) — or if this is a validation halo, use color.alpha.danger.* or color.alpha.warning.*.The look comes from the tracking page, and Lumen keeps its own values
The look comes from Warp's tracking page, the page a customer opens to see where a shipment is, which is the page I set as the base. Lumen keeps its own values, since the version of Lumen inside that page was older and would have brought the green shadows back, and it takes the parts I'd asked for from that page, like its buttons, hover effects, interactions, animations, spacing and overall polish. It's dark by default, with one green and Satoshi as the one typeface for everything, and the cards stand out by being a little lighter than the page with a thin line around them.
Try light, and the whole screen switches with it, since every part of it reads the same tokens.
75201 to 30303
Motion is numbers, because you can't explain how something moves to code in words
The hardest part of the system was motion. I had to put what I knew from Figma and After Effects into code, like how long a small interaction should last, 100 milliseconds or 400, and which curve it eases on. You can't explain how something moves to code in words, it needs numbers, so every motion in Lumen is a number. The button presses down to 0.97 while an icon button goes to 0.92, since a squeeze to 0.97 on a 24 pixel target is too small to see. When a button goes from loading to done, filming it frame by frame showed a blank green frame between the spinner and the check, so the old label now leaves in 80 milliseconds and the new one arrives in 180. If someone has turned animations off, things just appear instead of sliding in, and the theme changes at once.
- Rest
- Hover
button.motion.duration.hover-in—button.motion.easing.in—
- Press
button.motion.press-scale—icon-button.motion.press-scale—button.motion.duration.press-scale—
- Loading, 1.4 s
button.motion.duration.spin—
- Done
button.motion.duration.layer-out—button.motion.duration.layer-in—button.motion.duration.success-hold—
The components on this page have their states worked out, from hover and focus to loading, disabled and errors
These are Lumen's own components, running on this page. Each one has its states worked out, like hover, focus, loading, disabled, and errors that say what to fix.
The newer contract keeps each component's facts in one file, because three copies of them had drifted apart
There's no Figma library for Lumen because it lives in code, and drawing all of its components in Figma first would have taken me years. A component's facts used to be written down in three places, and they had drifted apart, in things like the glow and the focus ring, so now one JSON file holds them, the parts, the states, the motion and the wording, and 33 of Lumen's 98 components are on it so far. For those 33 the docs page and the written guide are drawn from that file, so a person reading the docs and a model reading the file get the same answer, and the checks added for it caught all 8 of the defects planted to test them.
RestWaiting for a pointer
The intent's fill, edge and label color. The primary is Spring Green with a near-black label at 13.7:1.
{"id": "rest","name": "Rest","short": "Waiting for a pointer","summary": "The intent's fill, edge and label color. The primary is Spring Green with a near-black label at 13.7:1.","specimen": { "props": { "intent": "primary" }, "label": "Get rates" }}- The tokens are plain JSON in an open standard called DTCG, because the build tool and Tokens Studio in Figma both read it with no custom code, and the cost is that the standard is still a draft, so Lumen pins the version.
- One build writes ten folders of output from them, so a change gets made once.
- Lumen is distributed through shadcn, which copies a component's code into a product's own repo instead of installing a package, so a team owns the code and can theme it without forking, and the cost is that an update doesn't reach them on its own, they pull it in again.
button.intent.primary.background.rest
css/tokens.css--button-intent-primary-background-rest: #00fa8a;tailwind/theme.css--button-intent-primary-background-rest: #00fa8a;ts/tokens.tsexport const ButtonIntentPrimaryBackgroundRest: string;ios/LumenTokens.swiftpublic static let buttonIntentPrimaryBackgroundRest = UIColor(red: 0.000, green: 0.980, blue: 0.541, alpha: 1)compose/LumenTokens.ktval buttonIntentPrimaryBackgroundRest = Color(0xff00fa8a)flutter/lumen_tokens.dartstatic const buttonIntentPrimaryBackgroundRest = Color(0xFF00FA8A);liquid/css-variables.liquid--button-intent-primary-background-rest: #00fa8a;scss/tokens.scss$button-intent-primary-background-rest: #00fa8a;json/tokens.flat.json"ButtonIntentPrimaryBackgroundRest": "#00fa8a",
Next time I'd design a component in Figma before its spec, and 65 contracts are still to move
If I started again, I'd go into Figma and design the component first, before turning it into the spec, instead of tweaking things one after another. Thirty-three of the 98 contracts are on the newest form and the other 65 are still to move. A small dropdown and a large one should animate differently, and Lumen doesn't handle that yet, though it should be easy to add now that the foundations are in place. It's not released yet.