Design System
Tokens, components, and build rules for dark, data-heavy dashboards. A page links tokens.css and components.css; three variables set its accent hue, secondary hue, and contrast.
- Tables that keep their content width
- A label column at least 24ch wide
- Basis notes attached to figures
- Notes that run at the table's width
- Opt-in sticky table headers
- Prose tables
- A tint on the sorted column
- Heat cells
- Two-up split layout
- Two-column prose
- Wide dashboard column
- Balanced heading line breaks
- chart-gutter.js: the first axis digit no longer clips
- Fonts preload and name no fallback
- Fix: wrapped table headers no longer cover row one
- v42026-08-31Switch, boxed inputs, CSS tooltips, native modal, accordion, callouts, sortable headers, count-up KPIs, staggered reveals, the glow-grid border glow, and the theme wipe. Print styles: print.css and flyer.html.
- v32026-07-21Left nav rail with scroll-spy, the agents.md build contract, the starter.html skeleton, self-hosted fonts, and a command palette that indexes every token.
- v2.12026-06-16Type and spacing scales increased. --text-xs became the 13px minimum, and --text-label the minimum for uppercase mono labels.
- v22026-06-05Generator tier added (accent, secondary, and base hue plus contrast). Cyan 195 and neon pink 320 became the palette.
- v12026-03First token set: OKLCH palette, five surface steps, sharp corners, the three-face type system.
Start here
tokens.css and components.css hold the fonts, palette, type scale, spacing, and every component on this page. Link both in the head, in this order, then use the tokens.
<link rel="stylesheet" href="https://design.seantippen.com/tokens.css"> <link rel="stylesheet" href="https://design.seantippen.com/components.css">
All three faces load from tokens.css. There is no Google Fonts link to add.
Three rules
var(--token) in CSS and tok('--token') in Chart.js. Never paste a hex, rgba, or oklch value. The one exception is Chart.js dataset colors, which the Canvas API cannot resolve from CSS.0 by default; only pills, toggles, and circular controls are rounded. No gradient page or section backgrounds, and no gradient text.Lock dark mode on brand-critical pages
Stops a reader's dark-mode browser from re-mapping the palette and making the design look wrong. Add a theme-color meta matching --color-bg for the address bar.
<meta name="color-scheme" content="dark"> <meta name="darkreader-lock"> <meta name="theme-color" content="#0a0c12">
Color
All custom colors are OKLCH, and each swatch is captioned with its use. Hex is used only for Chart.js data series (Canvas API). Click anything with a token name to copy its computed value; shift-click copies it as hex. The theme controls above recolor every swatch.
Brand accents
Surfaces
Five steps, from the app background to a floating overlay. Each step up is lighter than the one below.
Text hierarchy
Four steps. None is pure white. Labels, captions, and interface chrome use the lower two steps, so data has the highest contrast.
Borders
White at low alpha in dark mode, black at low alpha in light mode. They have no hue, so changing the accent does not change them.
Status
Green is success, amber is warning, red is danger, and blue is info. The theme controls do not change these hues.
Data series (Chart.js palette)
Eight hex colors at the same perceived brightness so no series stands out more than another. They are hex because the Canvas API cannot read CSS custom properties at paint time. Click a band to copy its hex.
Contrast ratios
Calculated from the current tokens. Moving the theme controls or switching light and dark mode recalculates them.
| Pair | Ratio | Grade |
|---|---|---|
| Body text on canvas | . | |
| Secondary on canvas | . | |
| Muted on canvas | . | |
| Disabled on canvas | . | |
| Accent on canvas | . | |
| Body text on surface | . |
Typography
Three typefaces: Big Shoulders Display for the hero heading only, Inter for everything else, and JetBrains Mono for numbers and code. All three are self-hosted from this domain as variable-weight latin subsets. Sizes scale with the viewport through clamp().
The three faces
Type scale
Every step is a token. --text-xs (13px) is the smallest size; no text on any page renders smaller. Click a row to copy the token.
Weight scale
Leading and tracking
| Token | Value | Use |
|---|---|---|
| --leading-tight | 1.2 | KPI values, display headings |
| --leading-snug | 1.35 | Card copy, dense descriptions |
| --leading-normal | 1.5 | UI default |
| --leading-relaxed | 1.65 | Long-form body |
| --measure | 65ch | Max reading width |
| --tracking-display | -0.03em | Big Shoulders hero |
| --tracking-tight | -0.01em | Headings |
| --tracking-label | 0.12em | Every uppercase mono label |
Spacing & motion
Fluid spacing uses clamp() to scale between a minimum and a maximum viewport width. Motion uses the duration and easing tokens: ease-out by default, spring for a press or a drop, and every animation wrapped in a prefers-reduced-motion check. Click any row to copy its token.
Fluid spacing scale
Fixed spacing, 4px base
Use these when a value must not move with the viewport: icon gaps, control padding, grid gutters inside a component.
Motion tokens
| Token | Value | Use |
|---|---|---|
| --duration-instant | 80ms | Press feedback, tooltip show |
| --duration-fast | 150ms | Hover, focus, small state changes |
| --duration-normal | 250ms | Drawers, view transitions |
| --duration-slow | 400ms | Toasts, page-load reveal |
| --ease-out | decelerate | Default for functional motion |
| --ease-in-out | symmetric | Looping or reversible motion |
| --ease-spring | overshoot | Toast and command palette only |
Shadow and focus
| Token | Use |
|---|---|
| --shadow-sm | Resting control |
| --shadow-md | Raised card, hover lift |
| --shadow-lg | Drawer, modal |
| --shadow-float | Floating panel with a hairline ring |
| --shadow-float-lg | Command palette, large overlay |
| --focus-ring | Always on :focus-visible, never :focus |
| --radius | 0. Default for every corner |
| --radius-full | Pills, badges, toggle thumbs, dots |
Components
Every demo below uses the classes in components.css. The Code tab on each demo shows its markup.
Buttons
Each button state, shown without hovering. The .is-hover, .is-active, and .is-focus classes copy the matching pseudo-class styles. Use them on specimen pages only.
| Variant | Default | Hover | Active | Focus | Disabled |
|---|---|---|---|---|---|
| Default | |||||
| Primary |
Input & chips
Form fields & switches
Use boxed inputs in forms and the underline input in toolbars. aria-invalid="true" turns the border red. The switch thumb moves with spring easing.
Tabs & segmented
Add .animated to .tabs to animate the active underline. Without it, the underline switches instantly.
Badges & toasts
Tooltips
CSS only. Put data-tip="text" on any element; the tooltip shows on hover and keyboard focus. data-tip-pos="bottom" puts it below the element. Keep tooltip text to a short label.
Callouts
Inline: kbd & animated links
In a how-to, name a literal key with Shift; never use it to advertise a shortcut. Read the build contract for the full registry. The link underline animates in from the left and still works when the link wraps to a second line.
Empty & error states
Skeleton loading
Accordion
Native <details>, so it works without JavaScript. The body height animates in browsers that support it and opens instantly in the rest.
Why is LOCAL-PENDING counted as paid?
Why do scan counts change for a day after the match?
Can I use a second accent color?
Modal
Native <dialog> opened with showModal(). The browser provides the top layer, backdrop, Escape to close, and focus trap. The open animation is CSS only, using @starting-style.
Drawer
A panel that slides in from the right with detail for one item. Click the scrim or press Escape to close it.
Data display
KPIs, charts, and tables. No card wrappers; data sits directly on the surface. Numbers are monospace with tabular figures so digits line up in columns. Every table sits in a .table-scroll wrapper and every chart in a .scroll-x wrapper.
KPI markers
Bar chart
Chart.js 4.4.7. Series colors come from tok() on the hex tokens. Global defaults are set from tokens: square corners, mono tick labels, and a 12px minimum font size.
Data table
Headers carrying aria-sort are sortable; click one. CSS draws the arrows and the active underline from the attribute. Page JS sorts the rows and adds td.sorted to the sorted column's cells. The badge shows a state the row does not otherwise show.
| Region | Revenue | Growth | Target |
|---|---|---|---|
| Northeast | $842,500 | +12.3% | Met |
| Southeast | $621,300 | +8.1% | At risk |
| Midwest | $534,700 | +2.4% | Met |
| West Coast | $412,800 | -3.7% | Missed |
| Total | $2,411,300 | +5.1% |
Table rules
The full list is in kit.md, in the tables appendix.
4,312 / 3,423 or 1,021 (764). Each metric gets its own column. Too wide means cut a metric or a row, never merge..fit keeps the table at its content width; a .split partner fills the rest of the row.Fitted table with notes
.fit keeps the table at its content width, td.cell-label keeps the label column at least 24ch wide, a .detail-note sits under its figure, and .table-notes run at the table's width. The .split.hug partner takes the rest of the row, or moves underneath when the row is too narrow for both.
| Plan | Subscribers | Gross revenue |
|---|---|---|
| Annual plans | 772 | $184,620$239.15 per subscriber |
| Monthly plans | 1,447 | $31,834 |
| Free trials | 385 | $0 |
| Total | 2,604 | $216,454 |
- Gross revenue is what subscribers paid, before processing fees.
- Free trials carry no revenue and stay in the subscriber count.
Breakdown in its own table
The main table stays addable. The breakdown of one parent row gets its own table, and its total matches that row: 1,447 in both places.
| Subscribers by plan | Count |
|---|---|
| Annual plans | 772 |
| Monthly plans | 1,447 |
| Free trials | 385 |
| Total | 2,604 |
| Monthly plans by signup source | Count |
|---|---|
| Website | 900 |
| Mobile app | 480 |
| Partner referral | 67 |
| Total | 1,447 |
Heat on one column
td.heat-1 to td.heat-4 tint the cells of one column, using the --heat-* tokens. A note says what the tint means.
| Region | Visits | Conversion rate |
|---|---|---|
| Northeast | 12,480 | 6.8% |
| Southeast | 9,912 | 5.1% |
| Midwest | 8,305 | 3.4% |
| West Coast | 7,140 | 1.9% |
- Shading follows conversion rate: the darker the cell, the higher the rate.
Info rows
Dashboards
A full dashboard built from the components above with no extra component CSS, then the small status components on their own.
Composed dashboard
| Rep | Sold | Revenue |
|---|---|---|
| Avery | 1,284 | $58,210 |
| Mateo | 1,102 | $49,870 |
| Priya | 986 | $44,120 |
| Total | 3,372 | $152,200 |
Primitive set
Delta chips, progress bars, pills, the toolbar, and stale timestamps. All are in components.css.
Motion & depth
Use motion only to show a change of state. This page uses one rise on page load, native scroll-driven reveals, View Transitions when the theme or accent changes, and numbers that count up once when they scroll into view. Actions triggered from the keyboard are not animated. All motion turns off under prefers-reduced-motion.
Hover lift
On hover, the card moves up slightly and its shadow gets deeper. Never scale on hover. Both hover styles are classes: .hover-lift and .hover-border.
Glow grid
The only effect that follows the pointer. A radial highlight on the 1px border is faint on every card while the cursor is in the grid and strong on the card under it. It changes borders only; fills stay flat. Turn it on per grid with .glow-grid, .glow-card, and the pointermove helper in kit.md.
Count-up numbers
KPI values count up to their target once, when they scroll into view, over 900ms with ease-out. Tabular figures keep the width fixed so the number does not shift while it counts. With reduced motion on, the final value shows immediately. The helper is in kit.md.
Frosted glass & shadow elevation
Use glass only on overlays: modals, dropdowns, the command palette, and the nav rail. Never on flat cards. Use shadows only to show elevation.
Build contract
The eight files a page can use: three stylesheets, two scripts, one build contract written for agents, and two templates to copy.
data-theme-toggle on a .theme-btn and the new theme is revealed in a circle that grows from the button. It saves the choice and updates the color-scheme and theme-color meta tags to match.Compatibility
About forty projects link these two stylesheets from this domain. No public custom property or component class is removed or renamed; changes only add. The compatibility aliases (--bg, --surface, --text, --accent, and the rest) are permanent.
Greenville Triumph work uses a separate design system: design.greenvilletriumph.club
Anti-patterns
var(--color-bg), or one position:fixed background in palette colors that does not move.oklch(0.70 0.25 320) as a state color.transform: scale() on hover; it blurs text and overlaps nearby elements.translateY(-2px) lift plus a deeper shadow.var(--color-text) or var(--color-accent) with a weight bump.0.65rem to make a dense block fit.--text-label; cut content or widen the column..table-scroll so it scrolls inside its own box..fit keeps it at content width; give the row a .split partner..data-table with a total row.td.cell-label, or widen the column until the label fits on one line.Ship checklist
Check every line before a dashboard goes live.
- Both sheets linked,
tokens.cssbeforecomponents.css - No Google Fonts link; the three faces load from
tokens.css - No hex, rgba, or oklch literals in CSS (Chart.js data series excepted)
- Colors via
var(--token), charts viatok('--token') - No raw rem or px
font-size; nothing below--text-xs - Every uppercase mono label at
--text-labelwith--tracking-label - Sharp corners; rounded only for pills, toggles, circles
- One accent per layout; pink for states only; no blue-purple
- Text never pure white; body and accent clear AAA on the canvas
- Amber for warning states only
- No gradient text; no gradient page or section backgrounds
- Glass only on nav, rail, drawers, and overlays, never flat cards
- Every table in
.table-scroll, every chart in.scroll-x - No horizontal page scroll at 390px; every section reachable
tabular-numson every numeric column and KPI- Hover lifts with
translateY, neverscale() - Focus rings on
:focus-visible; tap targets 44px or larger prefers-reduced-motionrespected- Dark mode locked on brand-critical pages
- No em-dashes; plain, literal copy
- Font preloads in the head; no fallback faces
chart-gutter.jsafter Chart.js; no truncated axis labels- One value per table cell; the value column adds up
- Breakdowns in their own table, with a total that matches the parent row
- Values beside their labels at the widest viewport
- Every comparison names its reference; every money figure its basis
- Every color in a chart or table has a key
- No sections behind tabs; no card grid for ledger data
- Headings name their contents; no question headings
- Empty, loading, and error states on every data region
- No visible keyboard-shortcut hints
- Rendered and looked at, at 390px and 1440px
Token reference
The four generator variables at the top set the values of the derived color tokens. The full set is in tokens.css, and every token is searchable from the search button.
/* Generator tier: the derived tokens below are computed from these */ --accent-h: 195 --secondary-h: 320 --base-h: 252 --contrast: 1 /* Accent and surface (derived) */ --color-accent --color-accent-hover --color-accent-border --color-accent-solid-hover --color-secondary --accent-muted --accent-subtle --color-bg --color-surface --color-surface-hover --color-surface-raised --color-surface-overlay /* Text hierarchy */ --color-text --color-text-secondary --color-text-muted --color-text-disabled --text-alpha-90 to --text-alpha-15 /* Borders */ --color-border --color-border-emphasis --color-border-strong /* Status */ --color-success --color-warning --color-danger --color-info (and each -subtle) /* Chart data series (hex, for Chart.js) */ --green --blue --red --amber --purple --cyan --yellow --orange /* Table heat (accent at rising alpha) */ --heat-1 --heat-2 --heat-3 --heat-4 /* Type */ --font-sans --font-mono --font-display --text-xs to --text-4xl /* fluid clamp scale, --text-xs is the floor */ --text-label /* the one uppercase mono label size */ --leading-* --tracking-* --measure /* Spacing / motion / radius / layout */ --space-xs to --space-xl --space-section --space-1 to --space-16 --duration-* --ease-out --ease-spring --radius: 0 --radius-full: 9999px --max-width: 1100px --sidebar-w: 260px /* Compatibility aliases, permanent */ --bg --surface --surface2 --surface3 --surface-hover --text --text-dim --text-muted --text-secondary --text-disabled --accent --accent2 --secondary --border --border-emphasis
These counts and sizes are read from tokens.css and components.css when the page loads. The same fetch builds the search index.