# Pattern Library

A pattern library documents reusable solutions to recurring user tasks, often combining multiple components with content and flow guidance.

- Type: artifact
- Domain: Experience & interface
- Level: Intermediate
- Last reviewed: 2026-09-21
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/pattern-library/>)

## What it means

A pattern library captures solutions at a task or journey level—for example, asking for an address, recovering from an error, or navigating a service. A pattern explains the user problem, evidence, sequence, component composition, content decisions, variations, and conditions where it should not be used.

## Why it matters

Components answer how an interface unit behaves; patterns help teams decide how units work together to support a goal. Sharing this reasoning prevents teams from copying surface layouts while missing the research and operational details that make a solution effective.

## When to use it

Use patterns when multiple products face a similar user problem and evidence suggests a reusable approach. Keep a pattern provisional when contexts differ materially or the evidence base is narrow.

## How it works

1. Frame the recurring user problem independently of a particular screen.
2. Collect examples and research from more than one implementation.
3. Describe the recommended flow, content, components, and decision points.
4. State prerequisites, alternatives, accessibility considerations, and exceptions.
5. Test the pattern in complete journeys, not only as a static example.
6. Track maturity and update guidance as implementations produce new evidence.

## A practical example

A pattern for confirming an email address describes when confirmation is necessary, message timing, code expiry, resend behavior, error recovery, and accessible status updates. Teams can adapt branding while preserving the researched task structure.

## Where it breaks

Patterns can become cargo cults when copied into a different policy, culture, or risk context. They are guidance rather than universal templates, and a mature pattern may still need product-specific research, content, security review, and accessibility testing.

## Common mistakes

- Calling every component a pattern and losing the task-level distinction.
- Showing only a polished example without rationale or failure states.
- Declaring a pattern standard after one product uses it.
- Forcing a pattern into contexts with different user risks or constraints.

## Sources

1. [Patterns](<https://design-system.service.gov.uk/patterns/>) — Government Digital Service · Pattern documentation
2. [Atomic Design: Designing Systems](<https://atomicdesign.bradfrost.com/chapter-1/>) — Brad Frost · Original author
3. [GOV.UK Design System](<https://design-system.service.gov.uk/>) — Government Digital Service · Institutional design system

## Related topics

- [Component Library](<https://wiki.soroush.uk/topic/component-library/>)
- [Design System](<https://wiki.soroush.uk/topic/design-system/>)
- [Usability Testing](<https://wiki.soroush.uk/topic/usability-testing/>)
