Skip to content

Tokens

The design values the whole system comes from, the same ones your taisho.config.ts produces. Each swatch uses the live CSS var, so it follows the site’s light or dark mode.

Color

Each family has 10 shades (100 light → 1000 dark) generated in OKLCH from a seed. Use them with bg-{family}-{shade} or the --color-{family}-{shade} var.

Gray
100
200
300
400
500
600
700
800
900
1000
Brand
100
200
300
400
500
600
700
800
900
1000
Brand secondary
100
200
300
400
500
600
700
800
900
1000
Accent
100
200
300
400
500
600
700
800
900
1000
Success
100
200
300
400
500
600
700
800
900
1000
Warning
100
200
300
400
500
600
700
800
900
1000
Info
100
200
300
400
500
600
700
800
900
1000
Danger
100
200
300
400
500
600
700
800
900
1000

Text color

heading --ts-color-heading
copy --ts-color-copy
subtle --ts-color-subtle
label --ts-color-label

Status colors

success Sample text
warning Sample text
info Sample text
danger Sample text

Typography

Sizes

Aa 10 · 10px
Aa 12 · 12px
Aa 14 · 14px
Aa 16 · 16px
Aa 18 · 18px
Aa 20 · 20px
Aa 24 · clamp(var(--ts-sizing-20), 2vw + 1rem, var(--ts-sizing-24))
Aa 28 · clamp(var(--ts-sizing-24), 2.5vw + 1rem, var(--ts-sizing-28))
Aa 32 · clamp(var(--ts-sizing-24), 3vw + 1rem, var(--ts-sizing-32))
Aa 36 · clamp(var(--ts-sizing-28), 3.5vw + 1rem, var(--ts-sizing-36))
Aa 40 · clamp(var(--ts-sizing-32), 4vw + 1rem, var(--ts-sizing-40))
Aa 48 · clamp(var(--ts-sizing-36), 5vw + 1rem, var(--ts-sizing-48))
Aa 60 · clamp(var(--ts-sizing-40), 6vw + 1rem, var(--ts-sizing-60))
Aa 72 · clamp(var(--ts-sizing-48), 7.5vw + 1rem, var(--ts-sizing-72))

Weights

thin 100
extralight 200
light 300
normal 400
medium 500
semibold 600
bold 700
extrabold 800
black 900

Spacing

A semantic scale shared by gaps and padding (gap-*, p-*). It’s the one compact density redefines.

none · 0px
quarter · 6px
half · 12px
base · 24px
section · 32px
double · 48px

Corner radius

--ts-corner-shape is the corner shape: round by default and squircle if the theme sets cornerShape: 'squircle'. With squircle (only where the browser supports corner-shape) every radius goes up one step on the scale: xs takes the value of sm, and so on up to 2xl. 3xl, none and full don’t move.

none
xs
sm
md
lg
xl
2xl
3xl
full

Border and ring width

One scale for every stroke: borders, rings (box-shadow: 0 0 0 N), focus outlines, and accent bands. 1 is the materials’ hairline; 2 is emphasis (active tab, avatar ring); 3 is the outline-* outline; 4 is the focus halo and outline-4-transparent. Override it from the theme with the borderWidths key.

1 1px
2 2px
3 3px
4 4px

Blur

For glass backgrounds and decorative layers (backdrop-blur-*, blur-*). none exists so you can transition from or to a blur. The Modal and Drawer backdrop goes from none to sm. Theme key: blurs.

none 0px
sm 4px
md 8px
lg 16px
xl 48px

Layers (z-index)

A semantic scale. Each role has its layer, and components use the role (z-index: var(--ts-z-dropdown)), not a one-off number. The stacking order is the order of the values. The numeric steps z-0 … z-50 are still available for general use. Theme key: zIndex.

base 0
raised 1
pinned 2
handle 3
sticky 10
glow 30
nav 30
banner 40
nav-menu 40
dropdown 50
toast 50
overlay 50
dialog 51

Opacity

Steps for opacity-* and one semantic role. muted is the resting opacity of secondary elements that light up on hover (the Tag and Banner close button). Theme key: opacities.

0 0
30 0.3
40 0.4
50 0.5
60 0.6
70 0.7
75 0.75
80 0.8
90 0.9
100 1
muted 0.6

Screens

Reference viewport widths. max-w-screen-* reads them as a variable. The NavBar, Sidebar, and responsive Table breakpoints use these same values, but an @container or @media condition can’t read a variable. The generator takes them from the default scale, so a theme override (the screens key) moves the utilities, not those breakpoints.

sm 640px
md 768px
lg 1024px
xl 1280px

Contrast

--ts-contrast-threshold is the OKLCH lightness below which a custom Badge’s text switches to white (the contrastThreshold key).

threshold 0.56

Shadows

sm
md
lg
xl

Motion

Durations and curves for every CSS transition in the system (duration-*, ease-*). With prefers-reduced-motion: reduce, transition durations drop to 1ms from the tokens, and --ts-iterations-loop goes to 0: the skeleton, the indeterminate bar, and the Badge halo stand still. The other loops (spin, loop-*) keep going. More in Motion.

instant 100ms
fast 150ms
base 200ms
slow 300ms
slower 500ms
spin 600ms
loop-fast 1200ms
loop-base 1600ms
loop-slow 4000ms
loop infinite
standard ease
in cubic-bezier(0.4, 0, 1, 1)
out cubic-bezier(0.22, 1, 0.36, 1)
spring cubic-bezier(0.16, 1.3, 0.3, 1)
in-out ease-in-out
linear linear

Control sizes

Height, padding, and box size of each control in its three sizes (sm, md, lg). They’re what compact redefines, so controls get tighter without touching the components. Each row is a pattern that covers its three sizes; the values go in sm · md · lg order.

Pattern Comfortable Compact
--ts-control-h-{xs|sm|md|lg}24px · 32px · 40px · 48px24px · 32px · 40px · 48px
--ts-button-px-{xs|sm|md|lg}6px · 10px · 14px · 20px6px · 10px · 14px · 20px
--ts-field-px-{sm|md|lg}10px · 12px · 14px10px · 12px · 14px
--ts-select-pr-{sm|md|lg}32px · 36px · 40px32px · 36px · 40px
--ts-textarea-px-{sm|md|lg}10px · 12px · 14px10px · 12px · 14px
--ts-textarea-py-{sm|md|lg}8px · 10px · 12px8px · 10px · 12px
--ts-badge-h-{sm|md|lg}20px · 24px · 28px20px · 24px · 28px
--ts-badge-px-{sm|md|lg}8px · 10px · 12px8px · 10px · 12px
--ts-tag-h-{sm|md|lg}20px · 24px · 28px20px · 24px · 28px
--ts-tag-px-{sm|md|lg}6px · 8px · 10px6px · 8px · 10px
--ts-control-box-{sm|md|lg}14px · 16px · 20px14px · 16px · 20px
--ts-radio-dot-{sm|md|lg}6px · 8px · 10px6px · 8px · 10px

Token families

These properties come in large families, so they’re documented as a pattern with a count and an example instead of one by one. Backgrounds and backdrops have two levels each, and -contrast is the text that reads well on that color.

Pattern Count Example What it’s for
--color-{palette}-{shade}-contrast70 tokens--color-brand-100-contrast: var(--color-gray-1000)A readable text color on that shade (white or gray 1000, depending on contrast). It’s what ts-color-{palette}-{shade}-contrast uses.
--color-{palette}-solid[-hover|-active][-contrast]48 tokens--color-brand-solid: var(--color-brand-600)The solid fill of each brand and status color (primary Button, Checkbox, Radio, and Toggle), its hover and active, and the readable text on each. It’s the seed’s step if that is darker than 600; otherwise 600.
--ts-color-{status}-contrast4 tokens--ts-color-success-contrast: var(--color-success-500-contrast)Readable text on the solid color of each status (success, warning, info, danger).
--ts-sizing-{n}36 tokens--ts-sizing-0: 0pxThe pixel scale behind ts-w-{n}, ts-h-{n}, ts-size-{n}, and the typography. {n} is the number of px.
--color-grayAlpha-{shade}10 tokens--color-grayAlpha-100: light-dark(oklch(0 0 0 / 0.05), oklch(1 0 0 / 0.05))Translucent gray (black in light mode, white in dark mode) for surfaces that let what’s behind show through.
--color-{background|overlay}-{n}4 tokens--color-background-100: light-dark(oklch(1 0 0), oklch(0.12 0 0))Page backgrounds (background) and the Modal and Drawer backdrops (overlay); each has two levels.

Other tokens

The font families (--font-sans, --font-mono), the solid button’s background color, and the spotlight glow.

--font-sans "Geist Sans", "Geist Sans Fallback", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
--font-mono "Geist Mono", "Geist Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
--ts-color-btn var(--color-gray-1000)
--ts-color-highlight light-dark(var(--color-gray-100), var(--color-gray-200))
--ts-color-highlight-strong light-dark(var(--color-gray-200), var(--color-gray-300))
--ts-color-toggle-thumb light-dark(var(--color-background-100), var(--color-gray-1000))
--ts-color-toggle-icon light-dark(var(--color-gray-1000), var(--color-gray-100))
--ts-corner-shape round
--ts-focus-ring-color light-dark(var(--color-grayAlpha-700), var(--color-grayAlpha-600))
--ts-spotlight-color light-dark(var(--color-grayAlpha-100), var(--color-grayAlpha-200))

How to use them

Prefer the system’s semantic utilities, and fall back to CSS vars only for one-off cases.

svelte
<!-- Semantic utility (recommended) -->
<div class="ts bg-brand-500 p-base radius-lg gap-half">…</div>

<!-- Direct CSS var (one-off cases) -->
<div style="background: var(--color-brand-500); padding: var(--ts-space-base)">…</div>