What's in a design system
5 minGitHub's Primer splits into tokens, components, patterns and docs, with a path for GitHub staff to propose changes. Sort its real pieces into those layers, then check what your own library is missing.
Lesson video
Tastebud · 5:01 · Captions on screen
A design system is tokens, components, patterns and docs, plus a clear way for other teams to change it.
- Tokens
- Named values, like a colour or a spacing step. Change one, and every component that reads it follows.
- Components
- Reusable parts, like a Button, with their behaviour built in.
- Patterns
- Recipes for a common screen built from components, like a page with nothing in it yet.
- Docs
- The written rules for when and how to use each part.
- Contribution path
- How another team proposes a change, and when it hears back.
- Why. Each layer stores one kind of decision: values in tokens, behaviour in components, judgement in patterns and docs. The way in keeps them current once other teams rely on them.
- Real example. Primer's menu lists Primitives (its tokens), Components and UI Patterns, plus a Contribute section. GitHub staff proposing a change get an acknowledgment or a clear next step within a week. (GitHub Primer, Nov 2026)
- When to break it. shadcn/ui is made to be copied. Its components land as code in your own project, so your team changes its copy freely and nobody upstream needs to agree.
- Common mistake. Shipping components with no usage notes. Primer's Button page calls primary the 'Highest-priority action; use sparingly.' Leave that line out and screens start filling with green buttons.
Our take. Write down how another team proposes a change before you build your tenth component. Without that path, the first team on a deadline copies your Button, and from then on you maintain two Buttons.
Tokens carry a value up to the component
Primer's primary button asks for --button-primary-bgColor-rest. That token points at --bgColor-success-emphasis, which holds the green. Switch to the dark theme and only that last value changes, from #1f883d to #238636.
Primer's green button reaches its colour through two tokens
- Button variant="primary". The component in code. For its background it names a token and nothing else.
- --button-primary-bgColor-rest. A component token, meant only for the button's own CSS. Its value is another token.
- --bgColor-success-emphasis. A functional token: one value the whole interface shares wherever it shows success.
- #1f883d light, #238636 dark. The only raw values in the chain. A theme swaps these and leaves everything above them alone.
A pattern is a recipe made of components
Empty states sits under UI Patterns, apart from the component list. It tells you how to fill a screen that has nothing in it yet, using the Blankslate component and a few icons.
Primer's empty state is one component and some icons, arranged by a recipe
- Blankslate (component). The part the pattern is built on.
- Graphic.
- Primary and secondary text.
- Primary and secondary actions.
- Icons. A GitHub marketing icon as the graphic by default, the alert icon for an error, and an Octicon before the action's words when they need help.
A contribution path other teams can follow
For now Primer takes changes only from GitHub staff. They start an early idea as a discussion and a firmer one as a proposal, and hear back within a week. If Primer passes, the team keeps a locally owned version.
At Primer, a proposal gets an answer within a week and named owners if it goes ahead
- Start a discussion. For questions, feedback and ideas still at an early stage. GitHub staff only.
- Open a pattern proposal. When the team is surer of what it needs. Also GitHub staff only.
- Hear back within a week. An acknowledgment or a clear next step. It may not be the final decision yet.
- Primer decides whether to evaluate. The first call is whether to invest in a closer look. If Primer needs more evidence, it asks for something specific.
- Named owners plan it. A proposal Primer pursues gets a named design owner and a named engineering owner, who keep testing it. If Primer passes, the team carries on with a locally owned version.
Try it
Sort Primer into its four layers
Every piece below comes from GitHub's Primer design system, as published in Nov 2026. Put each one in the layer it belongs to.
--fgColor-muted
Blankslate
Empty states
Component status: Experimental, Ready, Deprecated
--button-primary-bgColor-rest
Dialog
Primary button: "Highest-priority action; use sparingly."
Loading
Quick check
Your Figma library has 40 polished components, yet three product teams each picked a different grey for secondary text. Which layer is missing?
Watch next
Watch it for How Brad Frost describes a design system and its parts. Try mapping each part he names onto the four layers.
Watch it for The models he describes for running a design system. For each one, notice who is allowed to change the system, and how.
Connects to: 6.5 Reusable component patterns · 7.1 Design tokens · 12.3 Handing off tokens · 20.2 Building your library
Sources · checked Nov 2026
- Primer: Product UI home and menuPrimer's menu sections (Getting Started, Primitives, UI Patterns, Components, Contribute) and the component and pattern names Button, Dialog, Empty states, Forms, Loading
- Primer: Color primitivesToken names --fgColor-muted and --bgColor-success-emphasis, and --button-primary-bgColor-rest listed under Pattern, Button, all available as CSS variables
- Primer: Token namesPrimer's three token categories: base, functional ('global UI patterns') and component/pattern ('should only be used in component CSS')
- @primer/primitives 11.10.0, light theme CSS--fgColor-muted is #59636e, --bgColor-success-emphasis is #1f883d, --fgColor-white is #ffffff, and --button-primary-bgColor-rest is var(--bgColor-success-emphasis)
- @primer/primitives 11.10.0, dark theme CSSIn the dark theme --fgColor-muted is #9198a1 and --bgColor-success-emphasis is #238636
- Primer: How to contributeNot looking for contributions from non-GitHub staff; start a discussion for an early idea, open a pattern proposal issue when surer; Hubbers get an acknowledgment or clear next step within a week; the first decision is whether to invest in further evaluation; pursued proposals get named design and engineering owners; if not pursued, the team can continue with a locally owned implementation
- Primer: ButtonFour style variants, Primary, Default, Invisible and Danger (the variant prop also accepts link); Primary is the 'Highest-priority action; use sparingly'; never put more than one in a group of buttons
- Primer: Empty statesEmpty states are built on the Blankslate component (graphic, primary text, secondary text, primary action, secondary action, border); a GitHub marketing icon is the default graphic, the alert icon for errors, and an Octicon can go before action copy
- Primer: Component statusStatus labels Experimental, Ready and Deprecated, and whether a component is ready for production
- shadcn/ui: Introduction'This is not a component library. It is how you build your component library.' shadcn/ui hands you the actual component code, and you edit it directly (the breakIt line)
- npm: @primer/reactPrimer React 38.47.0, published 23 Nov 2026, the package the video's Button import comes from
- GitHub Docs: Creating a new repositoryThe button label Create repository used in the video's code