01 / Trico · 2025–2026
Design engineering · 01 · System
The system this site is built with
Tokens in Figma Variables with light and dark modes, exported to CSS and React components. This page is built from the same files the site runs on: when a token changes, the docs change with it.
- Primitives
- 36
- Semantic × 2 modes
- 27
- Text styles
- 18
- Components
- 8
ITurn on Inspect, top right: every component on this page tells you what it’s made of, and holding Alt measures the distance between two elements.
01
From Figma to the browser
Figma holds the values; the repo is the source of truth. Between them sit two scripts and no manual steps.
- 1
Figma Variables
Variables and text styles
Four collections: primitives, semantic with Light and Dark modes, spacing and shape, and motion. Type lives in text styles.
- 2
Export
design/tokens/figma-export.json
Variables exactly as they leave Figma, committed to the repo so every change shows up in the history.
- 3
DTCG tokens
scripts/figma-to-dtcg.mjs
Turns each variable into the standard token format and keeps aliases intact: a semantic token still points to its primitive.
- 4
CSS
scripts/build-tokens.mjs
Style Dictionary writes tokens.css: primitives as custom properties, semantic tokens with light-dark(), and text classes with fluid sizes.
- 5
Components
src/components
They only read semantic tokens. A hard-coded color in a component is a bug, not a shortcut.
- In Figma
color/text/accentLight → blue/500 · Dark → blue/300- In DTCG
"$value": "{color.blue.500}"- In CSS
--color-text-accent: light-dark(var(--color-blue-500), var(--color-blue-300));- On screen
- See the system →See the system →
02
Color
A short palette: paper and ink for light mode, night and snow for dark, and a single blue accent. Components never use it directly; they go through semantic tokens.
Primitives
paper
- 0#fbfaf7
- 50#f4f1ea
- 100#e9e4da
ink
- 300#b8b3a9
- 500#66635c
- 700#3b3a36
- 900#151513
- a10#1515131a
- a20#15151333
night
- 700#23262b
- 800#1f2226
- 900#15171a
- 950#0d0e10
snow
- 100#f1efea
- 200#c4c2bc
- 300#b9b7b1
- 500#8e8c87
- a10#f1efea1a
- a20#f1efea33
blue
- 100#e4e8ff
- 300#8197ff
- 500#2a4deb
- 900#1a2459
gray
- 100#f5f5f5
- 700#434343
- a15#3d3d3d26
- a06#1111110f
black
- a50#00000080
red
- 100#fdecea
- 200#fedadc
- 300#ff8a80
- 600#b42318
- 800#4a1a17
- 900#3a1714
white
- a08#ffffff14
- a50#ffffff80
Semantic
Each semantic token has one value per mode. The site follows your operating system until you pick a mode with the Theme button. 27 of 27 semantic tokens point to a primitive in both modes. None has a value of its own.
| Token | Light | Dark |
|---|---|---|
bg-canvas | paper.50 | night.950 |
bg-surface | paper.0 | night.900 |
bg-sunken | paper.100 | night.800 |
bg-inverse | ink.900 | snow.100 |
bg-accent | blue.500 | blue.300 |
bg-accent-subtle | blue.100 | blue.900 |
bg-artifact | paper.0 | paper.0 |
bg-control | gray.100 | night.700 |
bg-danger | red.600 | red.300 |
bg-danger-subtle | red.100 | red.900 |
bg-danger-progress | red.200 | red.800 |
text-primary | Aaink.900 | Aasnow.100 |
text-secondary | Aaink.700 | Aasnow.300 |
text-tertiary | Aaink.500 | Aasnow.500 |
text-inverse | Aapaper.0 | Aanight.950 |
text-accent | Aablue.500 | Aablue.300 |
text-control | Aagray.700 | Aasnow.200 |
text-danger | Aared.600 | Aared.300 |
text-on-danger | Aapaper.0 | Aaink.900 |
line-grid | ink.a10 | snow.a10 |
line-strong | ink.a20 | snow.a20 |
line-accent | blue.500 | blue.300 |
line-control | ink.500 | snow.500 |
line-danger | red.600 | red.300 |
line-edge | gray.a06 | white.a08 |
line-on-danger | white.a50 | white.a50 |
shadow-control | gray.a15 | black.a50 |
Contrast
The text and background pairs the site actually uses, computed from each mode’s real values. The lowest is 4.7:1; the AA minimum for body text is 4.5:1.
| Text on background | Light | Dark |
|---|---|---|
text-primary / bg-canvas | Aa16.2:1 AAA | Aa16.8:1 AAA |
text-primary / bg-surface | Aa17.5:1 AAA | Aa15.6:1 AAA |
text-primary / bg-sunken | Aa14.4:1 AAA | Aa13.9:1 AAA |
text-secondary / bg-canvas | Aa10.1:1 AAA | Aa9.6:1 AAA |
text-secondary / bg-surface | Aa10.9:1 AAA | Aa9.0:1 AAA |
text-secondary / bg-sunken | Aa9.0:1 AAA | Aa8.0:1 AAA |
text-tertiary / bg-canvas | Aa5.3:1 AA | Aa5.7:1 AA |
text-tertiary / bg-surface | Aa5.7:1 AA | Aa5.3:1 AA |
text-tertiary / bg-sunken | Aa4.7:1 AA | Aa4.8:1 AA |
text-accent / bg-canvas | Aa5.5:1 AA | Aa7.2:1 AAA |
text-accent / bg-surface | Aa6.0:1 AA | Aa6.7:1 AA |
text-accent / bg-sunken | Aa4.9:1 AA | Aa5.9:1 AA |
text-inverse / bg-accent | Aa6.0:1 AA | Aa7.2:1 AAA |
text-inverse / bg-inverse | Aa17.5:1 AAA | Aa16.8:1 AAA |
text-accent / bg-accent-subtle | Aa5.1:1 AA | Aa5.4:1 AA |
03
Typography
Satoshi for reading, Geist Mono for labels. Styles of 32 px and up scale with the screen: the size listed is the maximum.
t-display-xlSatoshi 500 · 112/0.95 · -0.03emHome hero
One system over a thousand exceptions
t-display-lSatoshi 500 · 96/0.95 · -0.03emCase title and contact CTA
One system over a thousand exceptions
t-display-mSatoshi 500 · 72/1 · -0.02emNext case
One system over a thousand exceptions
t-heading-xlSatoshi 500 · 64/1 · -0.02emKey figures
One system over a thousand exceptions
t-heading-lSatoshi 500 · 48/1.05 · -0.015emSection title or case in a list
One system over a thousand exceptions
t-heading-mSatoshi 500 · 40/1.1 · -0.01emSection intro, guiding question
One system over a thousand exceptions
t-heading-sSatoshi 500 · 32/1.15 · -0.01emPrinciples
One system over a thousand exceptions
t-titleSatoshi 500 · 22/1.25 · -0.005emCard title
Systems for products that keep evolving
t-leadSatoshi 400 · 20/1.45Hero subtitle
Systems for products that keep evolving
t-body-lSatoshi 400 · 18/1.55Case body text
Systems for products that keep evolving
t-body-mSatoshi 400 · 16/1.5General text
Systems for products that keep evolving
t-body-m-strongSatoshi 500 · 16/1.5Buttons, links
Systems for products that keep evolving
t-body-sSatoshi 400 · 14/1.45Navigation, metadata
Systems for products that keep evolving
t-body-s-strongSatoshi 500 · 14/1.45Small emphasis
Systems for products that keep evolving
t-body-xsSatoshi 400 · 13/1.4Chips
Systems for products that keep evolving
t-body-xs-strongSatoshi 500 · 13/1.4Pills
Systems for products that keep evolving
t-quoteSatoshi 400 · 28/1.25 · -0.005emQuotes and testimonials
Systems for products that keep evolving
t-label-monoGeist Mono 400 · 12/1.2 · 0.06emUppercase labels
Systems for products that keep evolving
04
Spacing and shape
A 4 px scale. Steps grow as space separates bigger things: 4 between an icon and its label, 96 between sections.
Space
space-14space-28space-312space-416space-520space-624space-832space-1040space-1248space-1664space-2080space-2496space-30120
Radius
radius-sm6radius-md12radius-lg16radius-full999
Stroke
stroke-default1stroke-accent2stroke-control1.5
05
Motion
Durations and curves are tokens too. With reduced motion on, every duration drops to 0 and the site shows up without animating.
You have reduced motion on: the bars jump to the end without animating.
Duration · with ease-standard
- instant 100ms
- fast 160ms
- base 240ms
- slow 480ms
- deliberate 800ms
Curve · over duration-deliberate
- standard cubic-bezier(0.2, 0, 0, 1)
- out cubic-bezier(0.16, 1, 0.3, 1)
- in-out cubic-bezier(0.65, 0, 0.35, 1)
06
Components
Every component has the same name in Figma and in code. Figma only holds the variants; hover, focus and disabled are handled in CSS.
Pill
Figma properties:
Variant=Outline|Accent, Size=M|SCompact labels and controls. The ones that act are buttons; the ones that inform are text.
iOS and AndroidShippediOS and AndroidShippedButton
Figma properties:
Variant=Primary|Secondary|GhostHover, focus and disabled are handled in CSS; Figma only holds the variants.
Decision · 2026-10-05Variant and state kept apart: Figma only holds variants and CSS handles states, so combinations don’t multiply.
Case row
Figma properties:
Media=Right|LeftLabel, title and three pills: role, platform and project status.
Web card
Figma properties:
Label, Title, 3 pills, StatusSite capture on top, details below: platform, scope and status. The whole card is clickable.
Decision · 2026-10-24Web design sits in a grid, not rows, so it reads apart from the product cases at a glance.
Card
Figma properties:
State=Default|HoverLabel, title, body and link. The whole card is clickable; focus shows on the border.
01 · System
The portfolio's design system
Figma Variables with light and dark modes, exported to CSS and React components.
02 · Exploration
Glup, from Figma to React Native
A hydration app designed in Figma and built with Claude Code: tokens, components, tested logic and a reviewed accessibility pass.
Section header
Figma properties:
Label, Meta, Show metaNumbered mono label with an optional detail on the right.
06 — Components
Section header
The header and the footer are system components too: they sit at the top and bottom of this page.
07
System rules
Few rules, no exceptions. Each one says how it’s kept.
RuleTwo named modes, Light and Dark, each with its own palette.
How it’s keptDark mode uses night and snow instead of inverting light. The semantic table shows both side by side.
RuleEvery semantic token points to a primitive.
How it’s keptThe site build stops if an alias points to a primitive that doesn’t exist.
RuleNo component uses a loose color.
How it’s keptComponents only read semantic tokens, which is why the same code works in both modes.
RuleIn Figma, components only have variants.
How it’s keptCSS handles hover, focus and disabled, so combinations don’t multiply in the file.
RuleAll text passes AA in both modes.
How it’s keptContrast on this page is computed on every build from each mode’s real values.

