Learning Design Systems Course index

Reference 0004

Variants vs States

A quick decision aid for avoiding component API sprawl.

ConceptMeaningButton examplesAsk
VariantA deliberate product role or emphasis choice.Primary, secondary, tertiary, danger, ghost, text.“What kind of action is this?”
StateA temporary condition caused by interaction, data, permission, or async work.Hover, focus, pressed, disabled, loading, selected.“What is happening right now?”
SizeA density/layout adaptation, not a new meaning.Small, medium, large, icon-only.“What context must this fit?”
CompositionHow components combine into a larger pattern.Button group, toolbar, form actions.“What relationship do these actions have?”

Smell test

If a variant name describes a one-off screen location, it is probably not a variant. If it describes product intent, it might be.

Bad variant names