design system
definition
the shared, named set of rules and reusable parts that define how
your whole app looks and behaves, its colors, spacing, fonts, and
prebuilt pieces, defined once so every screen stays consistent.
plain
one rulebook for how your app looks. instead of styling each screen
from scratch, you define the look once and everything pulls from it.
when you tell the ai to "use the design system", it builds new
screens from the agreed set instead of inventing new styles every
time. the three pieces below, tokens, components, and the design
contract, are what it is made of.
in context
"build it with our design system." → don't
make up new colors or spacing, reuse the app's existing rulebook so
the new screen matches everything else.
tokens
definition
named values for the small design decisions, colors, spacing, font
sizes, corner radius, stored once and referenced everywhere instead
of hard-coding the raw numbers.
plain
nicknames for your design values. instead of "#1d4ed8" you say
"primary color", instead of "16px" you say "space-md". change the
token once and it updates everywhere. telling the ai to "use the
tokens" keeps it from sprinkling random colors and sizes around.
in context
"use the spacing tokens, don't hard-code pixels."
→ reference the named spacing values so it stays consistent and
changes in one place, instead of typing raw numbers each time.
components
definition
the reusable, prebuilt ui pieces of a design system, the button,
the card, the input, each styled to the system's rules, so you
assemble screens from them instead of building each one fresh.
plain
the ready-made building blocks of your app's look, a button, a
card, a form field, already styled to match. tell the ai to "use
the existing component" and it reuses the one you have instead of
inventing a new, slightly different button.
in context
"reuse the button component, don't make a new one."
→ grab the existing styled button instead of building a fresh one,
so the app does not end up with five different buttons.
design contract
definition
an agreed, written spec of what a screen or component must look like
and do, its layout, states, spacing, and behavior, that the build
is expected to match exactly.
plain
the rules the design has to follow, written down before the build
so there is a clear target. for vibecoding it is what you hand the
ai so it builds to a fixed spec instead of guessing, and what you
check the result against.
in context
"does this match the design contract?" →
check the built screen against the agreed spec, the spacing, states,
and layout it was supposed to hit.