Design System

Principles, conventions, and architecture.

Overview

Design principles, token architecture, and key conventions.

Othelia's design system is documented in docs/specs/DESIGN-SYSTEM.md and implemented across src/styles/globals.css (tokens) and src/components/ui/ (components). This page renders the real tokens and components from the codebase — when something changes in code, it changes here automatically.

Design Principles

  • Content density over decoration — every visual element must earn its space. Prefer showing more content over adding chrome.
  • Tool, not toy — the UI should feel like a capable instrument, not a consumer app. Prefer patterns that present information clearly.
  • Icons carry type, color carries meaning — use icons to distinguish categories, reserve color for status, authority level, or identity.
  • Earn every element — before adding a visual element, ask: does this convey information the user needs at this level?

Token Architecture

Two layers, not three:

  1. Primitives (sand, neutral, red, etc.) — raw colour values defined in globals.css
  2. Semantic (flat tokens + surface-* + status scales) — purpose-driven names that components use

Components are the mapping layer — Button knows it uses bg-primary. No component-token indirection needed.

Key Conventions

ConventionRule
Body texttext-sm (14px) default
FontInter only, self-hosted via next/font
Radiusrounded-lg for interactive, rounded-xl for containers
ShadowsAlways with borders, not instead of
Dark mode.dark class on root, sand → neutral swap
Status colorsTranslucent fills (bg-warning-200/70), not solid
Icons in buttonsSized by the Button component, don't add size classes
MemoizationDon't use useMemo/useCallback — React Compiler handles it

File Structure

PathPurpose
src/styles/globals.cssToken definitions, theme overrides, franchise theming
src/components/ui/UI primitives (shadcn/ui + Radix)
src/components/providers/ThemeProvider.tsxDark/light/system theme management
src/lib/utils.tscn() helper (clsx + tailwind-merge)
docs/specs/DESIGN-SYSTEM.mdFull specification document