14
4 min read
Anatomy, variants, states, sizes
You shipped the default button. Hover came later. Disabled was a one-off. Small was copied from another file. The matrix was never written down, so it never stayed coherent.
A component is anatomy first: the parts you name. Then variants, then sizes, then states. Every cell is token-driven. If a state is missing, it is a future bug, not a later polish pass.
Flip the primary token. The whole grid has to move with it.
Flip the primary token. Every variant, size, and state stays coherent.
Primary, secondary. Small, medium. Default, hover, disabled. You define the matrix before the first pull request, not after the third visual bug.