TFMKIT Design System
One visual language for every page on the site. This is the living documentation of that language — every swatch, specimen and component below is rendered from the same tokens and components the product uses, so this page can never drift from reality.
How it fits together
Three layers, one direction of flow: tokens define values, UnoCSS shortcuts apply them, components consume them.
Tokens
src/lib/design-system/tokens.ts — the typed
single source of truth: colors, type scale, spacing, shadows, easing.
Shortcuts
uno.config.ts — named utilities like card, btn-primary, heading-section mapped 1:1 to tokens.
Components
src/lib/design-system/components/ — typed
Svelte components (Button, Card, Badge…)
built on the shortcuts.
The rules
Enforced by eslint-design-system.cjs — these run as custom ESLint rules, not just convention.
- No hardcoded hex colors — use
designTokens.colors.*or UnoCSS color utilities. - No arbitrary spacing — use the spacing scale or UnoCSS spacing utilities.
- Typed props only — new
components take interfaces from
$lib/design-system/types. - Shortcuts over raw utilities —
write
card, notrounded-2xl border p-6 …. - Theme-aware always — every
color utility needs its
dark:counterpart.
Colors
Brand, semantic and neutral palettes, theme CSS variables, and gradients.
Typography
Font families, the heading scale, body styles, weights and tracking.
Layout & Spacing
The 4px spacing scale, containers, breakpoints and border radius.
Components
Typed Svelte components from $lib/design-system — buttons, cards, badges, inputs.
Effects
Shadows, glassmorphism, glows, background patterns and interaction states.
Utilities
Every UnoCSS shortcut alias, custom rule and icon collection in one catalog.