Documenting Patterns

Pattern documentation gives developers and designers the ability to provide context for their patterns and subgroups. The documentation file consists of Markdown with YAML front matter. It should follow this format:

title: Title for my pattern
This is a *Markdown* description of my pattern.

Attributes overview:

Both tags and states could be used for not including patterns in a UIKit specific build.

The description is used in the styleguide views.

Pattern documentation needs to have a .md file extension and match the name of the pattern it's documenting. For example, to document the following pattern:


We'd name our documentation file:


Documenting Pseudo-Patternspermalink

To add documentation to pseudo-patterns, create an companion .md file for that pseudo-pattern.

For example, to document the following pseudo-pattern:


We'd name our documentation file:


Documenting Subgroupspermalink

To document pattern subgroups, you need to create a companion .md file for that subgroup. For example create _patters/atoms/buttons/ for a pattern subgroup. In the .md file, the above concept can be applied. The doc-file resolving works the following {patternsRoot}/{pattern-group folder name}/{pattern-sub-group folder name}/_{pattern-sub-group raw name without prefixes}.md

This is a *Markdown* description of the subgroup button.

In the future we'll even also provide the possibility to document groups as well.

Adding More Attributes to the Front Matterpermalink

A future update of Pattern Lab will support more front matter attributes including: excludeFromStyleguide and links. It will also support adding custom attributes that could be utilized by plugins. For example, GitHub issues related to patterns.