Back to flin
flin

Design Tokens and Theming System

How FlinUI's design token system provides 50+ tokens for colors, spacing, typography, and shadows -- enabling consistent theming and dark mode across 365+ components.

Thales & Claude | March 25, 2026 9 min flin
flinflinuidesign-tokenstheming

When six AI agents build 70 components simultaneously, how do you ensure they all look like they belong to the same design system? The answer is design tokens -- a centralized set of values for colors, spacing, typography, shadows, and border radii that every component references instead of hardcoding.

FlinUI's design token system was the first thing we built in Session 037, before a single component was written. Fifty-plus tokens defined the visual language. Every Button, every Card, every Modal draws from the same well. Change a token, and every component that references it updates. Switch from light to dark theme, and the entire application transforms in a single state change.

What Design Tokens Are

Design tokens are named constants that represent visual design decisions. Instead of scattering #007bff throughout 365 component files, you define it once as primary and reference it everywhere:

// tokens.flin
primary = "#007bff"
primary_hover = "#0056b3"
primary_light = "#e3f2fd"

// Button.flin uses the token, not the hex value

Share this article:

Responses

Write a response
0/2000
Loading responses...

Related Articles