Look at any big product — a bank app, a Google service — and notice how every button, every spacing, every shade of blue feels part of one family. That consistency isn't luck; it comes from a design system: a shared set of rules and reusable pieces. You already have the tools to build a small one, and it's the natural endpoint of everything in this course.
1Design tokens — your single source of truth
Design tokens are the named, reusable values of your design — colours, spacing, font sizes, radii, shadows. You met the mechanism already: CSS custom properties. A design system simply means deciding these once and using them everywhere, never hard-coding a stray value.
:root {
/* colour tokens */
--color-brand: #FF6B00;
--color-ink: #0F1B2D;
/* spacing scale */
--space-1: 4px;
--space-2: 8px;
--space-3: 16px;
/* shape */
--radius: 10px;
}A spacing scale like this (4, 8, 16, 24, 32…) is a quiet superpower: when every margin and padding comes from the same scale, your whole layout feels rhythmic and intentional instead of slightly-off everywhere.
- Design tokens are named reusable values (colours, spacing, radii) — built with CSS variables.
- Decide values once on
:rootand reuse viavar()— never hard-code stray values. - A consistent spacing scale (4/8/16/24…) makes layouts feel rhythmic and intentional.
2Reusable components and consistency
The second half of a design system is components: reusable, named pieces — a button, a card, an input — built once (with BEM-style classes from the last lesson) and reused everywhere. Together, tokens and components give you:
- Consistency — every button looks and behaves the same, because it's the same button.
- Speed — you assemble pages from ready-made parts instead of restyling from scratch.
- Easy change — update the button component or a token once, and the whole product follows.
:root, components as well-named classes. Start there and you're thinking like a professional.- Components are reusable named pieces (button, card, input) built once and reused.
- Tokens + components give consistency, speed, and one-place updates.
- You can build a small design system today with
:roottokens and BEM-named component classes.
★ Practical: a mini design system
In any playground:
- Define tokens on
:root: a brand colour, a spacing scale (at least 3 steps), and a radius. - Build a
.btncomponent that uses those tokens. - Build a second component (e.g. a
.card) that reuses the same tokens. - Change one token and confirm both components update together.
Ready to test yourself?
Take the short quiz. Score 60% or more to mark this lesson complete.
Start the quiz →💡 Log in to save your progress and earn the certificate.