Web & Digital Experience
Component libraries: finished in every variant and state
What's written down for every component
What makes a part trustworthy
01
Clear semantics
Named for what it is
A job card is a job card in code, in design and in conversation, never “Card 3”.
02
Every state
Not just the default
Hover, focus, loading, disabled and error are built and shown side by side.
03
Variants on purpose
A short list, each with a reason
Four statuses, not a style switch for every request.
04
Accessible by default
Built in once, inherited everywhere
Focus, labels and announcements live in the component, so every screen gets them.
05
Documented with examples
Live, next to the code
Each variant and state shown working, with when to use it.
Adding a variant, step by step
Job card · new variant “waiting on customer”
- done
Requested
by the dispatch board team
- done
Checked against existing variants
not covered by needs parts
- done
Built in every state
default to disabled
- done
Tested
keyboard, screen reader, 390 wide
- done
Documented
when to use it, with an example
- done
Released
as a new version; screens move to it when ready
One new variant, ready for every screen that shows a job, and nothing else changed.
What a component library hands off
In
Out
Worth building when the same parts appear on many screens
Good fit
- The same part shows up on many screens, or in several products.
- Teams build their own versions, and they drift.
- Accessibility has to be built once and kept.
Not the right fit
- A handful of screens, built once.
- An existing library does the job as it is.
Questions about component libraries
Can you build on an existing open-source library?
Often, yes. A good base library covers the basics; we add your own parts, like the job card, and your tokens.
How do teams find and try the components?
In a workbench that shows each component in every variant and state, with the code beside it.
What happens when a component changes?
It's released as a new version with notes. Screens move to it when they're ready, and nothing changes under them without warning.
Do business-specific parts belong in the library?
When more than one screen uses them, yes. The job card, the time-slot picker and the invoice line are as reusable as a button.