Skip to content
BlogPublished 11 August 2026

Components Are a Contract, Not a Collection

design systemscomponent librariesfrontend engineeringvisual regression testingtechnical leadership

A component library is not a gift. It is a contract between the team that built it and every team that comes after. If that contract is undocumented, untested, and unenforceable, the second team will rewrite it. That is not a failure of discipline. It is a failure of design. I have seen it happen, and I have also built the thing that stops it from happening.

What the contract actually covers

Most teams think of a component as a piece of UI. A button, a card, a modal. That framing is too narrow. A component is a unit of behaviour, a set of visual states, a performance budget, and a promise about accessibility. When any of those four things is missing from the specification, the contract has a gap. Gaps get filled by whoever is under the most pressure, and they get filled inconsistently.

In 2026, modern component contracts extend beyond TypeScript types to include compiled size limits and hydration costs. Tools like Size Limit and bundlewatch can fail a pull request automatically if a component crosses a threshold. That is enforcement at the merge point, not enforcement at the code review. The distinction matters because code review depends on a person being awake and opinionated. Automated gates do not have bad days.

The Production Design System I built reached best achievable Core Web Vitals scores. That result did not come from careful developers. It came from constraints that made carelessness impossible.

The first week is always an audit

When I start a design system engagement, I do not open Figma. I open the existing codebase and count duplication. How many button variants exist in how many files? How many of them share a class name but differ in behaviour? How many are tested?

The answers are always worse than the client expects. Not because the previous team was bad, but because component libraries grow under pressure. A deadline arrives, someone copies a component and tweaks it, and the copy never gets reconciled with the original. Multiply that by twelve months and three engineers and you have a library that is also a minefield.

The audit produces a map. Which components are safe to keep, which need surgery, and which need to be retired. I share that map before I write a single line of new code. The client needs to see the problem clearly before they can trust the solution.

Storybook is the contract made visible

Documentation written in a README gets out of date. Documentation that lives inside the component, rendered in Storybook, cannot drift without someone noticing. Every story is a runnable specification. Every variant is a visual test waiting to happen.

I use Storybook for two things. First, as a development environment, building components in isolation before they touch a real page. Second, as the source of truth for visual regression tests. Chromatic, or a self-hosted equivalent, captures a screenshot of every story on every pull request and diffs it against the baseline. If a seemingly unrelated change shifts a button by two pixels, the test catches it. The engineer sees the diff before it ships.

This is how a design system survives its second team. The new engineers do not need to hold the entire visual history in their heads. The test suite holds it for them.

The constraint that made it hard

The hardest part of any design system engagement is not the technical work. It is the negotiation over what counts as a component.

Product teams want flexibility. They want to pass a custom className and override whatever they need. Design teams want consistency. They want every instance of a card to look identical. Those two goals are in genuine tension, and the resolution is not a compromise. It is a decision about where the boundary of the contract sits.

I have built systems that were too rigid. Engineers worked around them. I have built systems that were too permissive. They drifted into inconsistency within a quarter. The version that holds is the one where the component exposes intentional escape hatches, documented in Storybook, tested in isolation, and named clearly enough that a new engineer understands the intent without asking.

That naming work is unglamorous. It takes longer than the implementation. It is also the reason the system is still in use two years later.

What visual regression testing actually catches

Teams that skip visual regression testing tend to discover regressions in production, in a customer complaint, or in a screenshot on a Slack message at 11pm. Teams that run visual regression testing tend to discover them in a pull request comment at 2pm.

The practical difference is not just stress. It is the cost of the fix. A regression caught before merge costs one engineer thirty minutes. A regression caught after a release costs a hotfix, a deployment, and a conversation with a client about why the dashboard looks broken.

I have run this calculation on real engagements. The tooling pays for itself inside the first month. After that it is overhead that earns its keep silently, every week, without anyone thinking about it.

For teams working across multiple client projects, the compounding value is even clearer. The Multi-client Web Delivery work I did involved shared components across separate codebases. Without visual regression testing, a change to a shared primitive would require manual verification across every consumer. With it, the test suite does the verification automatically.

When a second team picks it up

The real test of a design system is not the first delivery. It is the handover. A system that requires the original author to explain it has not been finished. It has been paused.

I structure every design system engagement with the handover in mind from day one. That means Storybook stories written for the next engineer, not for me. It means prop names chosen for clarity, not brevity. It means a changelog that records not just what changed but why. And it means performance budgets enforced at the CI level, so the constraints survive even if the context does not.

The Workbud Workshift Platform is a different kind of product, but the same principle applied. The system had to be operable by a team that was not present for the original decisions. The documentation was not an afterthought. It was part of the deliverable.

If you are comparing partners for a design system build or a component library audit, the question worth asking is not what they will build. It is what happens when they leave. A system that depends on its author is a liability. A system with a legible contract, enforced by tests and documented in Storybook, is an asset.

If that distinction matters to you, start a conversation or ask Kadon AI what a design system engagement looks like for your specific situation.

Want to talk about something here?

Let’s talk about it.

Start a conversation