@democratia/design v1.0.0
Democratia Design System
Complete reference for color tokens, typography, font weights, buttons, border radius, spacing scale, and accessibility patterns.
Colors
Core
--background
oklch(1 0 0)
--foreground
oklch(0.129 0.042 264.695)
--card
oklch(1 0 0)
--card-foreground
oklch(0.129 0.042 264.695)
--popover
oklch(1 0 0)
--popover-foreground
oklch(0.129 0.042 264.695)
Semantic
--primary
oklch(0.208 0.042 265.755)
--primary-foreground
oklch(0.984 0.003 247.858)
--secondary
oklch(0.968 0.007 247.896)
--secondary-foreground
oklch(0.208 0.042 265.755)
--muted
oklch(0.968 0.007 247.896)
--muted-foreground
oklch(0.554 0.046 257.417)
--accent
oklch(0.968 0.007 247.896)
--accent-foreground
oklch(0.208 0.042 265.755)
--destructive
oklch(0.577 0.245 27.325)
--destructive-foreground
oklch(0.985 0 0)
Interface
--border
oklch(0.929 0.013 255.508)
--input
oklch(0.929 0.013 255.508)
--ring
oklch(0.704 0.04 256.788)
Chart
--chart-1
oklch(0.646 0.222 41.116)
--chart-2
oklch(0.6 0.118 184.704)
--chart-3
oklch(0.398 0.07 227.392)
--chart-4
oklch(0.828 0.189 84.429)
--chart-5
oklch(0.769 0.188 70.08)
Sidebar
--sidebar
oklch(0.984 0.003 247.858)
--sidebar-foreground
oklch(0.129 0.042 264.695)
--sidebar-primary
oklch(0.208 0.042 265.755)
--sidebar-primary-fg
oklch(0.984 0.003 247.858)
--sidebar-accent
oklch(0.968 0.007 247.896)
--sidebar-accent-fg
oklch(0.208 0.042 265.755)
--sidebar-border
oklch(0.929 0.013 255.508)
--sidebar-ring
oklch(0.704 0.04 256.788)
Typography
Headings
Heading 1
h1 - 2.25remHeading 2
h2 - 1.875remHeading 3
h3 - 1.5remHeading 4
h4 - 1.25remHeading 5
h5 - 1.125remHeading 6
h6 - 1remBody text
Good civic design starts with clarity. When citizens interact with government services, every element - from color contrast to typography - shapes their experience and their trust in public institutions.
A consistent design system ensures that digital civic tools feel cohesive, accessible, and professional. By standardizing tokens for color, spacing, and typography, teams build faster while maintaining quality across all touchpoints.
Inline elements
Links are styled with an underline and --primary color, providing clear affordance.
Use strong for importance and emphasis for stress.
Inline code
renders in JetBrains Mono at
the current font size.
Code block
:root {
--primary: oklch(0.208 0.042 265.755);
--radius: 0.625rem;
--font-sans: "Source Sans 3", sans-serif;
--font-mono: "JetBrains Mono", monospace;
}
Lists
Unordered
- Design tokens
- Component library
- Accessibility guidelines
Ordered
- Define color palette
- Set typography scale
- Build components
Fonts
Source Sans 3
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
JetBrains Mono
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
Radius
sm
--radius - 4px
6px
md
--radius - 2px
8px
lg
var(--radius)
10px
xl
--radius + 4px
14px
Spacing
Focus & Accessibility
All interactive elements use a
2px solid ring on
:focus-visible,
powered by the
--ring token. Tab
through the elements below to
preview the focus style.
Focus demo
Focus-visible rule
:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
Reduced motion
When the user prefers reduced motion, all animations and transitions are suppressed to near-zero duration.
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}