PHPackages                             dnadesign/silverstripe-patternlab - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dnadesign/silverstripe-patternlab

ActiveSilverstripe-module

dnadesign/silverstripe-patternlab
=================================

Pattern lab.

61.9k3[1 issues](https://github.com/dnadesign/silverstripe-patternlab/issues)PHP

Since Jun 10Pushed 10y ago15 watchersCompare

[ Source](https://github.com/dnadesign/silverstripe-patternlab)[ Packagist](https://packagist.org/packages/dnadesign/silverstripe-patternlab)[ RSS](/packages/dnadesign-silverstripe-patternlab/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Pattern Lab Module
==================

[](#pattern-lab-module)

Introduction
------------

[](#introduction)

Pattern lab is a module which allows a SilveStripe developer to have a single place where they can define static HTML with which to test against. Often in project an element on a page may have multiple states or variances which need to be browser tested for, however since the CMS is database driven there isn't any gurantee that every instance possible will be covered in the existing content. Pattern lab's allow you to create static HTML for each of these variances in order to record and test for each one.

You can read more about pattern labs here:

Using this module
-----------------

[](#using-this-module)

Create a pattern folder under your templates directory: templates

- Patterns

Then begin creating pattern templates in this folder such as: templates

- Patterns
    - Pattern1
    - Pattern2

These will turn up on the index page automatically at /patterns and you will be able to click through to the pattern which will then render the pattern's template.

As these are not pages `` tags will need to be included in each file we generally recommend the following:

```

Some Content

```

Use the includes above in your Page.ss to ensure there's consistency in the head markup, doctype etc.

Custom Lab Controller
---------------------

[](#custom-lab-controller)

Optionally extend `PatternLab_Controller` with a name such as `MyPatternLab` like so:

```
class MyPatternLab extends PatternLab {

}
```

This lets you add an init function like your Page.php's init function to ensure they're both including the same CSS and Js.

You'll need to create a routes.yml file to override the existing route config:

```
---
name: routes
After: 'pattern-lab'
---
Director:
  rules:
    'patterns//$Action/$ID/$Name': 'MyPatternLab'
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/efd88fa106982bcf2e3cd689e6a37d352c54308d14dedeac4ac477a47a432363?d=identicon)[DNADesign](/maintainers/DNADesign)

![](https://www.gravatar.com/avatar/f83d64a4de5f1e0d6c4eaacb4250334eb1ac4c012f0c0f7e9dff8ec7d274c8ed?d=identicon)[Leapfrognz](/maintainers/Leapfrognz)

---

Top Contributors

[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (4 commits)")[![jedateach](https://avatars.githubusercontent.com/u/1356335?v=4)](https://github.com/jedateach "jedateach (3 commits)")[![cameronbourgeois](https://avatars.githubusercontent.com/u/1127276?v=4)](https://github.com/cameronbourgeois "cameronbourgeois (2 commits)")[![alex-dna](https://avatars.githubusercontent.com/u/6982515?v=4)](https://github.com/alex-dna "alex-dna (1 commits)")[![Leapfrognz](https://avatars.githubusercontent.com/u/1740262?v=4)](https://github.com/Leapfrognz "Leapfrognz (1 commits)")

### Embed Badge

![Health badge](/badges/dnadesign-silverstripe-patternlab/health.svg)

```
[![Health](https://phpackages.com/badges/dnadesign-silverstripe-patternlab/health.svg)](https://phpackages.com/packages/dnadesign-silverstripe-patternlab)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
