Design system
The tokens, the layout slots, the accessibility contracts every component keeps and what the lint checks. To see the colours, type scale and spacing drawn in both themes, with their contrast ratios, open Design tokens, visually.
This page is built from DESIGN.md in the repository, which is where it is edited.
At a glance
The document is long, so the site gives each section its own page. A section that is still long is cut into numbered parts.
- How the CSS ships
- Living style guide: A developer page in the reference host that draws every token and primitive from the real code.
- Principles: The rules every part of the interface follows.
- Tokens: The colours, type, spacing and other values the interface is built from.
- Layout and slots: Where each control sits on the screen, and which part of the code owns its place.
- Components and accessibility contracts: What each component must do for names, roles, focus and keyboard use.
- The product page: How the reference site's front page is written and laid out.
- Exempt surfaces: The few places that may hold raw values instead of tokens.
- What the lint checks, and where: The design rules the lint enforces, and where each check lives.
About this document
The map is the hero and the chrome recedes. MapCairn is calm, neutral and precise, with grouped controls, a floating search pill and a bottom sheet, in the way people already expect from a good maps app. Light and dark are equally polished. The target is WCAG 2.2 AA, built in from the first component.
Tokens live in packages/theme/src/tokens.css.ts. Components may only use tokens, so an off-scale value fails typecheck, and a lint test is the backstop for raw literals.