Documenting a System
A component library without documentation leaves every designer to guess how its parts are meant to be used. Imagine a bookings app whose button ships in three variants with no page behind it. Within a month, one screen has two primary buttons, another disables Book until every field is filled, and a third calls the same action Reserve.
Learn on the move: press play and turn your commute, walk or drive into time that grows your design career.

So documentation is the part of a system that carries its decisions to people who weren't in the room. It says when to use a component, how it behaves, what its text says and which foundations sit underneath it.
What a System's Documentation Holds
Public systems split their documentation along similar lines. IBM's Carbon gives each component tabs for guidelines, specifications, code and accessibility. The GOV.UK Design System keeps styles, components and patterns in separate sections. A team can look up the link color, a button, or a way to ask for a name.
That gives documentation four layers:
- Component pages: one page per component, from its description to its code.
- Usage guidelines: when to use a component, when to pick something else, and how it behaves and moves.
- Content guidelines: the rules for the words inside components, from casing to error messages.
- Pattern and foundation pages: decisions that span several components, such as a booking form, and the rules under them, such as color.
That list leaves out documentation for AI agents, which read the same system through tools such as the Figma MCP server. AI Agents & Design Systems covers it.
Anatomy of a Component Page
A component that ships without a page gets used the way each designer guesses it should be. The Figma file shows what a button looks like, but it can't say when a link would be better or which variant a delete action needs.
So a component page collects the answers people look for before they use a component. Nathan Curtis's 2018 series Documenting Components, written at EightShapes, splits that page into an introduction, examples, design guidelines and code.
Here is the bookings app's button in its Figma file, and on a page with those four sections:

The Parts of a Component Page
Most public systems build a component page from the same parts, in roughly the same order:
- Name and description: what the component is and the job it does, in one or two lines, such as "Button: starts an action, like booking a slot."
- Examples: a live demo of each variant and state that people can copy from.
- Usage guidelines: when to use the component, when to use something else, and how it behaves.
- Content guidelines: how to write the text inside it, such as a label's casing and length.
- Specs and tokens: sizes, spacing and the token behind every color.
- Accessibility: keyboard behavior, focus and what a screen reader announces.
- Code: the props engineers set and the import they copy.
- Changelog: what changed in each release.
Thus each part answers one question, and a reader can jump to it without reading the rest. Carbon's button specification, for example, lists heights from 24 px for extra small to 80 px for 2XL. It also names the token for every color, such as $button-primary-hover.
Here are those parts on the bookings app's button page:

Who Reads Which Part
A component page has several audiences, and each one reads a different part. Designers read usage and content guidelines when they pick a component. Engineers read specs and code when they build with it, and reviewers read accessibility before a release.
That's why many systems split the page into tabs by reader. Carbon's button page has four tabs: Guidelines, Specifications, Code and Accessibility. Atlassian's has Examples, Code, Usage and Changelog, so an engineer can land on Code and skip the design rules.
Here is the bookings app's button page as each reader opens it:

In practice, the description and examples serve every reader. So put them where everyone sees them, above the tabs or at the top of each one.
Tabs or a Single Page
The other common layout puts everything on a single page. GOV.UK's button page runs from "When to use this component" through "How it works" and "Research on this component" to "Recent changes". Its code examples sit inside each section.
That layout suits a team where designers and engineers read the same guidance together. Tabs suit a large system with many readers who each need one part. For a small product such as the bookings app, one page with clear headings is usually enough, and tabs can come later as the page grows.
Here is how the two layouts compare for the bookings app:

Where the Page Lives
A component page helps only where people already work, so it needs entry points in Figma and in code. Figma lets you add a description and a documentation link to every published component. The description shows in the Assets panel and in Dev Mode, and Figma searches it, so a keyword such as "CTA" helps people find the button.
In practice, the code side gets its entry point from Storybook's Autodocs, which builds a page from a component's stories once you add the autodocs tag. That page shows the description, the first story with live controls, a table of props and the other stories. So the full guidelines live on one documentation site, and Figma and Storybook each link back to it.
Here is how Figma and Storybook link to the bookings app's button page:

Pro tip: Not every component needs every category, so drop any heading with nothing real to say, as Curtis advises. An empty Content section on a divider teaches readers to skip the rest of the page.



