Patterns & Templates
A component library can hold a perfect button, text field and date picker while every booking form in the product still looks different. Imagine three designers building the same appointment form in one week. One puts the time slot first, one asks for a phone number up front, and one ends on a button labeled Next.
Learn on the move: press play and turn your commute, walk or drive into time that grows your design career.

So the gap sits above the components, in how they're arranged for a task. A pattern fixes that arrangement for one recurring task, and a page template fixes the structure of a whole page. The next designer then starts from a decision instead of a blank frame.
Where Patterns and Templates Sit
Brad Frost's Atomic Design (2016) names five levels: atoms, molecules, organisms, templates and pages. Patterns sit between the components and the templates, and most public systems give them a section of their own. The GOV.UK Design System lists 30 patterns, from Dates and Addresses to Confirmation pages. IBM Carbon lists 14, including Forms, Empty states and Login.
That's why a pattern carries rules a component can't hold. A button component knows how to look and respond to a press. GOV.UK's Question pages pattern goes further: it asks one question per page and labels the button Continue.
Anatomy of a Pattern
A pattern page that shows one mockup tells the next designer almost nothing. Imagine a library page called Booking form with a single screenshot. Nobody can tell which parts are fixed, which can change, or when the form is the right choice.
So a pattern needs named parts, the same way a component has a label, a container and states. A useful pattern has five: the task it solves, the components it uses, their arrangement, its rules and its variations.
Here is a booking form pattern page with and without its parts:

The Task It Solves
A pattern starts from a task people repeat across a product. The GOV.UK Design System names its patterns that way, in groups called Ask users for and Help users to. Under them sit tasks such as Dates, Addresses and Check answers, 22 in all, plus 8 page types.
So the name tells a designer when to reach for a pattern. A pattern called Two-column card form describes a look, so nobody knows which job it fits. In the bookings app, Book an appointment names the task, and every screen where someone books a slot can use it.
Here is a pattern list named by looks next to one named by tasks:

Thus the task is also where a pattern parts ways with a component. IBM Carbon says its patterns differ from components, “which are already designed, coded, and ready to be imported into a UI.” Carbon's patterns are guidance on combining those components for a user need.
Components and Their Arrangement
The components are the pattern's parts list. Alla Kholmatova's Design Systems (2017) calls these functional patterns: buttons, headers, form elements and menus. GOV.UK's Check answers pattern uses a back link, a page heading, summary lists with a Change link on every row, and a button labeled Accept and send.
So the arrangement is what turns that list into a pattern: the order, the grouping and the space between groups. Check answers groups its rows under section headings, such as Personal details and Application details. It ends on a statement that sending confirms the details are correct.
In practice, the bookings app's booking form arranges a back link, a heading, a summary of the chosen slot, the contact fields and one primary button. Every one of those already exists in the library.
Here are the parts of the booking form pattern on a phone:

Rules and Open Choices
Rules are the decisions a pattern fixes so nobody has to make them again. GOV.UK's Question pages pattern starts with one question per page and labels the button Continue. Carbon's forms pattern keeps labels to one to three words and puts the action buttons at the bottom of the form.
So besides its rules, a pattern names its open choices, the parts each team fills in. The booking form fixes the order and the button, while the fields stay open. A hair salon might ask for a name and a phone number, and a physiotherapist might add a reason for the visit.
Here is the same booking form pattern for a hair salon and a physiotherapist:

So the balance between fixed and open parts is where most pattern pages go wrong. A screenshot fixes nothing anyone can check. A giant component with a toggle for every field fixes too much, so a team that needs one extra field often detaches it.
Variations and States
Variations are the named versions of a pattern for different contexts. The booking form has a guest version that asks for contact details and a signed-in version that fills them in. The pattern page lists each variation with the case it fits.
So the page also needs states, which cover what happens while the task runs. States are the part a screenshot always leaves out. GOV.UK gives validation its own pattern, Recover from validation errors. It puts an error summary at the top of the page, a message next to each field, and keeps what the person typed.
In practice, the booking form needs three states beyond the default. A field can have an error, someone else can take the slot while the form is open, and a booking can succeed and hand over to the confirmation page.
Here are the three states of the booking form:

Pro tip: Write the task first and the screenshot last. If the pattern page can't finish the sentence “Use this when somebody needs to…”, the pattern probably names a look instead of a task.



