02 — Capability

What a shared library actually buys you.

Five things it should do before it earns the name.

One source for every token

Colour, spacing, radius and the type scale are declared once and read everywhere, so a change lands in a single edit.

Parts that travel

Each component carries its own styles and needs no global stylesheet, so moving it to another project is one file.

States drawn up front

Empty, loading, error and disabled are designed alongside the happy path instead of appearing when a ticket does.

Accessible by construction

Focus order, contrast and reduced-motion behaviour live inside the component rather than in a later audit.

Documentation beside the code

Every part ships with a README and a live demo at three widths, so usage notes cannot drift far from the source.

Principle

Copyable beats clever

A part that needs three imports and a build step to run elsewhere is not reusable, only well organised. Everything here is meant to survive being pasted into a project that knows nothing about this one.