~/designkit/tokens/
Tokens
Every value on this page is read from the package, so what you see is what you install. Never hard-code a colour in a component: use the token, and both themes keep working.
~/designkit/tokens.ts
Colors
Two themes, switched with data-theme on <html>. Dark is the default. The ratio next to a text colour is its contrast on the page background of that theme.
| Token | Dark | Light | Use |
|---|---|---|---|
--bg | #0a0e17 | #f4f6fb | Page background, also <meta name="theme-color"> |
--bg-2 | #111726 | #e9edf6 | Solid panels on top of the page: dropdowns, popovers |
--surface | rgba(255, 255, 255, 0.04) | rgba(255, 255, 255, 0.72) | Cards, buttons, inputs |
--surface-2 | rgba(255, 255, 255, 0.08) | rgba(255, 255, 255, 0.96) | Hover state of a surface |
--border | rgba(255, 255, 255, 0.09) | rgba(20, 30, 60, 0.12) | All 1px borders |
--text | #e6e9f2 15.90:1 AA | #141b2d 15.86:1 AA | Body text, headings |
--muted | #98a3b9 7.60:1 AA | #4b566d 6.81:1 AA | Secondary text, inactive links, meta |
--accent | #7dd3c0 | #0f766e | Brand teal: primary button, active pill, caret, bars |
--accent-text | #7dd3c0 10.98:1 AA | #0b6259 6.68:1 AA | Teal as text: links, numbers |
--accent-ink | #06201b 9.71:1 AA | #ffffff 5.47:1 AA | Text on a teal background |
--accent-2 | #b49cff | #6d4fd6 | Second brand colour, purple: gradients, highlights |
--accent-2-text | #c3b1ff 10.16:1 AA | #5b3fc4 6.58:1 AA | Purple as text: badges, "draft" |
--glow | rgba(125, 211, 192, 0.26) | rgba(15, 118, 110, 0.2) | The 4px ring on hover: box-shadow: 0 0 0 4px var(--glow) |
--shadow | 0 18px 50px rgba(0, 0, 0, 0.4) | 0 18px 40px rgba(30, 40, 80, 0.12) | Cards and dropdowns |
--chip-l | 68% | 30% | Lightness of a coloured chip, for hsl() with your own hue |
--chip-bg-a | 0.16 | 0.12 | Opacity of that chip’s background |
--grid-line | rgba(255, 255, 255, 0.035) | rgba(20, 30, 60, 0.05) | The faint background grid |
Gradients always run teal to purple, left to right.
background: linear-gradient(90deg, var(--accent), var(--accent-2));For a tinted border or a soft fill, mix the accent instead of inventing a colour.
/* a teal-tinted border on hover */
border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
/* a soft teal fill */
background: color-mix(in srgb, var(--accent) 12%, transparent);Known gaps
These pairs do not reach WCAG AA (4.5:1). Version 1.0.0 keeps every value exactly as the sites had it, so they are listed here instead of quietly changed.
- --syn-num on --bg-2, light theme: 4.42:1
~/designkit/syntax.ts
Syntax
For anything that looks like code. Each colour has a class: .kw .str .num-t .fn .prop .com .punc.
| Token | class | Dark | Light |
|---|---|---|---|
--syn-kw | .kw | #c792ea 8.02:1 AA | #8e3fc7 5.27:1 AA |
--syn-str | .str | #c3e88d 14.01:1 AA | #3b7a12 4.88:1 AA |
--syn-num | .num-t | #f78c6c 8.20:1 AA | #c2410c 4.79:1 AA |
--syn-fn | .fn | #82aaff 8.40:1 AA | #2459d1 5.67:1 AA |
--syn-prop | .prop | #7dd3c0 10.98:1 AA | #0b6259 6.68:1 AA |
--syn-com | .com | #7a879e 5.32:1 AA | #5f6b80 4.98:1 AA |
--syn-punc | .punc | #89ddff 12.73:1 AA | #0e7490 4.96:1 AA |
~/designkit/fonts.css
Typography
Two fonts. Inter for reading, JetBrains Mono for everything that should feel like an editor.
| Role | preview | Notes |
|---|---|---|
| Body text | The quick brown fox | Inter Variable, 1rem, line-height 1.6, at most 70 characters per line |
| Code-ish UI | The quick brown fox | JetBrains Mono Variable: nav links, buttons, tags, section titles, labels |
| h1 | The quick brown fox | Inter 700, large and tight: letter-spacing -0.04em, line-height about 0.95 |
| h2 | <Typography/> | Mono 700, written as a tag, with < and /> in --accent-text |
| h3 | The quick brown fox | Inter 700, 1.15rem |
Both fonts are self-hosted through @fontsource-variable. No Google Fonts, so no visitor IP goes to a third party.
~/designkit/shape.css
Shape
Sizes, radii and widths. Borders are always 1px of --border.
-
--radius -
--radius-sm -
6px -
999px
| Token or rule | Value |
|---|---|
--nav-h | 60px: header height; scroll-padding-top is 60 + 8px |
.container | min(1100px, 100% - 2rem): content width, 1rem gutter each side |
Header width | min(1360px, 100% - 2rem) |
.section | clamp(2.75rem, 6vw, 4.5rem) of padding, top and bottom |
--radius | 14px: cards, dropdowns |
--radius-sm | 9px: buttons, icon buttons, inputs |
Tags | 6px radius |
Pills | 999px: language switch, badges |
Icon buttons | 36 × 36px, 1px border, --surface |
~/designkit/motion.css
Motion
Two easings. Press play to see them next to each other.
--ease Default for everything
cubic-bezier(0.22, 1, 0.36, 1)
--spring Small playful overshoots: the logo brackets
cubic-bezier(0.34, 1.56, 0.64, 1)
- Hover transitions take 0.2 to 0.35s. Entrances take 0.7 to 0.9s: fade, an 18px rise and a blur.
- Buttons press down to scale(0.96), icon buttons to scale(0.92).
- Nothing follows the cursor. Buttons stay where they are. A gentle tilt on a large card is fine.
- prefers-reduced-motion switches all animation off. Anything you add has to respect it too.