Introduction

OverviewArchitectureAgent Experience

The product

This repository

Structure

Usage

Other

Design and UX

Components

Component recipes and the primitive that owns each behavior.

Rule

Compose the primitives in packages/design-system/components/ui before creating a new component. A repeated pattern becomes a component. A repeated visual value becomes a token. Components do not own new colours, sizes, radii, spacing, shadows, or fonts.

NeedPrimitive ownerRecipe
Primary, secondary, ghost, destructive actionbuttoncomponents.button-*
Label, control, helper, errorfield, inputcomponents.input-field*
Comparable recordstablecomponents.table-*
Statebadgecomponents.badge-*
Filtertogglecomponents.chip-filter*
Independent navigation targetcardcomponents.card-surface
Inset explanationalert, itemcomponents.panel-inset
Short supporting texttooltipcomponents.tooltip
Destructive confirmationdialogcomponents.dialog-surface
Raised anchored actionpopovercomponents.popover-surface
Code or machine samplekbdcomponents.code-block

Token contract

Each components.* recipe composes semantic colour, type, radius, spacing, and control tokens from the same DESIGN.md front matter. Consume the recipe through the existing primitive. Do not copy its resolved values into a feature.

Correct example

A filter uses toggle in its chip variant, which carries the components.chip-filter and components.chip-filter-selected recipes. Its selected state is also written and exposed to assistive technology. A destructive action uses button in its destructive variant and names the object and consequence.

Rejected example

A feature copies a button into its route, changes its radius, introduces a local status colour, and opens a dialog where inline expansion would keep the record visible. The feature now owns a second, undocumented component system.

Reasoning

Read the UI pattern catalogue and the visual language for shape and elevation.

On this page

GitHubEdit this page on GitHub