A module for Django that allows to build pattern libraries for your projects.
Maintained. Last release 4 months ago, commits in 3 of the last 26 weeks. Weaker on commit activity and issue handling.
pip install django-pattern-librarydjango-pattern-library
UI pattern libraries for Django templates. Try our online demo.

Features
This package automates the maintenance of UI pattern libraries or styleguides for Django projects, and allows developers to experiment with Django templates without having to create Django views and models.
- Create reusable patterns by creating Django templates files as usual.
- All patterns automatically show up in the pattern library’s interface.
- Define data as YAML files for the templates to render with the relevant Django context.
- Override Django Templates tags as needed to mock the template’s dependencies.
- Document your patterns with Markdown.
- Experimental: support for Jinja templates.
Why you need this
Pattern libraries will change your workflow for the better:
- They help separate concerns, both in code, and between members of a development team.
- If needed, they make it possible for UI development to happen before models and views are created.
- They encourage code reuse – defining independent UI components, that can be reused across apps, or ported to other projects.
- It makes it much simpler to test UI components – no need to figure out where they’re used across a site or app.
Learn more by watching our presentation – Reusable UI components: A journey from React to Wagtail.
Online demo
The pattern library is dependent on Django for rendering – but also supports exporting as a static site if needed. Try out our online demo: