Pattern library

A pattern is a documented, task-oriented composition of components. It gives a reader a repeatable way to solve a recurring interaction or content problem without making a page-specific arrangement look universal.

Boundary#

LayerOwns
FoundationVisual primitives and semantic tokens: colour, type, spacing, radii, shadows, and motion
ComponentA reusable interface unit with a defined purpose, behaviour, accessibility contract, source, and variants
PatternA composition of components that helps a person complete a recurring task
LayoutThe template structure that places patterns and page content in a surface

A pattern may use components, but it does not replace their pages. A layout may place a pattern, but it does not become the pattern merely because it contains one.

Rule#

Create a canonical pattern only when all of the following are true:

  • the task recurs across pages or properties;
  • the composition has meaningful choices, states, or accessibility behaviour beyond one component;
  • its constituent components and source evidence are known;
  • authors or implementers would otherwise repeat structural markup or re-decide the same behaviour.

Do not create a pattern for a one-off page composition, a visual mood board, or a component shown beside another component without a user task.

Canonical record#

Each pattern records its task, category, status, constituent components, content or data requirements, responsive and accessibility expectations, implementation evidence, and related patterns. Its current rule lives in the pattern page; source files and component pages remain the evidence behind it.

Patterns are not a replacement for Components or Shortcodes. Components remain the canonical interface library. Shortcodes remain the author-facing API. Patterns make their relationship useful for a recurring task.

Initial scope#

The initial library documents existing behaviour before it invents new behaviour:

  • Site navigation
  • Documentation layout

Search, reference indexes, and form flows become canonical patterns only after their repeated task and source evidence are audited.

Use Pattern library for the metadata and implementation recipe.