Playground

Tokens

Every colour, type, spacing, size, radius, motion and layer token with its real value, per theme and accent.

Using tokens

Every token is a CSS custom property on :root. Use var(--s4) instead of a number, and a theme or option changes it everywhere. The same values ship as W3C JSON at @monoline/css/tokens.json and as Figma variables in @monoline/tokens. See Theming for how to override them.

.card {
  padding: var(--s4);
  border: 1px solid var(--rule);
  color: var(--foreground);
}

Colour

Three themes. Switch with data-theme on the html element; the accent comes from data-accent.

Tokenwarmdarkmidnight
--background#FAFAF5#111110#060B1A
--foreground#16120E#F0EDE7#DDE3F5
--muted#706B65#8C8279#7680A5
--border#E6E1D9#242220#0F1630
--surface#16120E#09090A#02050F
--surface-textrgba(250, 250, 245, 0.85)rgba(240, 237, 231, 0.85)rgba(221, 227, 245, 0.85)
--accent#FF4500#FF4500#AAFF00
--accent-text#D13900#FF4500#AAFF00
--accent-2#AAFF00#AAFF00#00E5FF
--on-accent#16120E#111110#060B1A
--danger#B3261E#F0847A#FF8A80
--warning#8A5300#E0A23A#FFC857
--ok#1F6B3A#6FCF8E#7CE0A3

Lines, washes and ink

Derived from the text colour, so they follow every theme. Use --rule for dividers, --wash for hover and code backgrounds, and --ink-2 to --ink-5 for lighter text and fills.

TokenValue
--rulecolor-mix(in srgb, var(--foreground) 20%, transparent)
--washcolor-mix(in srgb, var(--foreground) 4%, transparent)
--wash-2color-mix(in srgb, var(--foreground) 9%, transparent)
--ink-1var(--foreground)
--ink-2color-mix(in srgb, var(--foreground) 70%, transparent)
--ink-3color-mix(in srgb, var(--foreground) 45%, transparent)
--ink-4color-mix(in srgb, var(--foreground) 25%, transparent)
--ink-5color-mix(in srgb, var(--foreground) 10%, transparent)
--hatchrepeating-linear-gradient(135deg, var(--muted) 0 1.5px, transparent 1.5px 7px)

Accent presets

data-accentwarm: accent, accent-textdark: accent, accent-textmidnight: accent, accent-text
orange#FF4500#FF4500#AAFF00
green#0E7A5F#45C29C#5FD6B2
blue#2563EB#5B9DFF#6FB1FF
violet#7C3AED#A78BFA#B49CFF
rose#E11D48#FB7185#FDA4AF
teal#0F766E#2DD4BF#5EEAD4
amber#B45309#FBBF24#FCD34D
slate#334155#CBD5E1#E2E8F0

Typography

TokenValueSample
--font-display"Space Mono", ui-monospace, monospaceThe quick brown fox
--font-body"DM Mono", ui-monospace, monospaceThe quick brown fox
--text-xs11pxThe quick brown fox
--text-sm13pxThe quick brown fox
--text-base15pxThe quick brown fox
--text-lg18pxThe quick brown fox
--display-smclamp(28px, 3.4vw, 40px)
--display-mdclamp(34px, 5vw, 64px)
--display-xlclamp(44px, 8vw, 104px)
--weight-regular400
--weight-medium500
--weight-bold700
--leading-tight1.2
--leading-normal1.55
--leading-relaxed1.6
--heading-1clamp(32px, 4vw, 44px)The quick brown fox
--heading-2clamp(26px, 3vw, 34px)The quick brown fox

Set data-font to mono, sans or serif to swap the font tokens. Font weights are not tokens yet; components use 400, 500 and 700.

Spacing

A 4px scale. data-density (compact, comfortable, spacious) rescales --s2 to --s7 and the base text size.

TokenValueSize
--s14px
--s28px
--s312px
--s416px
--s524px
--s632px
--s748px
--s864px
--s996px

Sizes and layout

Control heights keep Button, Input and Select the same height at each size. The layout tokens set the sidebar, line length and widest column.

TokenValue
--control-smcalc(var(--s6) + var(--s1))
--control-mdvar(--s7)
--control-lgcalc(var(--s7) + var(--s2))
TokenValue
--side264px
--measure64ch
--content1080px
--container-sm640px
--container-md768px
--container-lg1024px
--container-xl1280px
--container-2xl1536px
--bp-xs480px
--bp-sm640px
--bp-md768px
--bp-lg1024px
--bp-xl1280px
--bp-2xl1536px
--window-padvar(--s6)

Radius

Square by default. data-radius="soft" sets --radius to 6px and "round" to 12px. --round is for pills and dots.

TokenValueShape
--radius0
--round999px
--radius-smcalc(var(--radius) * 0.5)
--radius-mdvar(--radius)
--radius-lgcalc(var(--radius) * 1.5)

Motion and layers

Animations are turned off for people who ask the system for reduced motion.

TokenValue
--easecubic-bezier(0.76, 0, 0.24, 1)
--fast0.12s
--base0.2s
--slow0.45s
TokenValue
--z-drawer40
--z-grain50
--z-toast60

Not tokens yet

Said plainly, so you do not look for them: the kit has no breakpoint, font-weight, size-scale, shadow or border-width tokens. Breakpoints in the stylesheets are fixed values, and the docs site uses 560, 880 and 1100 pixels. The useMediaQuery hook takes any query. These are on the roadmap.

  • Breakpoints: a standard set, as custom properties and a documented list.
  • Font weights and line heights.
  • Sizes for widths and heights beyond the control heights.
  • A radius scale (small, medium, large) instead of one value.
  • Shadows for popovers and toasts, and a focus-ring token.