Brand-agnostic, app-facing professional UI substrate for server-rendered Django (Tailwind 4, Alpine 3, HTMX 2). Accessible by construction; not a Django-admin skin.
Project description
brickwork
A brand-agnostic, app-facing professional UI substrate for server-rendered Django, on the ecosystem stack: Tailwind 4 (CSS-first), Alpine 3, HTMX 2, Django 6.0. It provides the application shell, navigation and active-route resolution, an accessible form-field renderer, and interaction primitives (modal, toast, dropdown, combobox, tabs, disclosure) wrapped behind stable Django components.
This is not a Django-admin skin. Its value is the professional baseline: WCAG 2.2 AA as a tested guarantee (axe-core in CI, not a claim), RTL via logical properties, a real themeable dark-mode system, and four composable theme axes (brand x theme x density x direction). Applications provide data, permissions and business behaviour; the substrate provides structure, presentation and interaction conventions.
Status: 1.2.0 on public PyPI (
pip install django-brickwork). The five semver-governed public-API contracts (token, template, navigation, interaction, JavaScript) are live, and every component passes two hard gates: is it accessible (axe-core WCAG 2.2 AA in CI) and is it beautiful by default. The surface is complete: the application shell and nav, the beautiful-by-default token system (elevation, state overlays, type roles, motion, borders, with fine colours derived live from a small load-bearing brand set viacolor-mix()), the interaction set (modal, toast, dropdown, combobox, tabs, disclosure, tooltip, slide-over), forms with the whole-form renderer and the HTMX 422 loop, the data table with sortable and selectable modes, the feedback and input-chrome primitives, the wizard/stepper, and a machine-readable token contract with a per-tenant brand-CSS emitter. The design of record is the spec and brief in the icvoss/oss umbrella:
- Spec:
docs/specs/django-brickwork/(the five versioned public-API contracts).- Design + branding + integration:
docs/DESIGN.md,docs/BRANDING.md,docs/INTEGRATION.md,docs/ADOPTION.md.- Changelog:
CHANGELOG.md(0.1.0 through 1.2.0).Marketing pages (v1.2.0). brickwork also ships an opt-in
brickwork.marketingsub-app (landing/pricing/about page templates, a marketing shell, and eight marketing components: hero, feature grid, pricing tier/table, CTA, testimonial, logo cloud, stat band, FAQ) on the same--bw-*token and accessibility contract, so a consumer can build its public marketing pages on brickwork alongside its console. See ADR-055 in the umbrella (oss/docs/adrs/ADR-055-brickwork-marketing-kit-opt-in-subapp.md) and the wider templates-catalogue trajectory this opens (oss/docs/plans/brickwork-templates-catalogue-direction.md).
Documentation
- docs/DESIGN.md: the canonical token reference; every
--bw-*name, default value, and derivation rule. - docs/BRANDING.md: how a consuming app brands brickwork (the load-bearing token minimum, dark mode, the four axes, the fg-on-accent contrast trap, and dynamic per-tenant / per-user theming recipes).
- docs/INTEGRATION.md: the greenfield integration cookbook, the seams a consuming app wires end to end (settings and static, nav config, context processor, a worked HTMX 422 form, the chrome/body boundary).
- docs/ADOPTION.md: the strangle guide for migrating an existing app onto brickwork cluster by cluster (multi-host, asset coexistence, the htmx floor).
- frontend/README.md: the in-repo build that compiles the shipped static assets.
Install
pip install django-brickwork # from pypi.icvoss.com (private index)
INSTALLED_APPS = [
"brickwork",
# ...
]
The compiled CSS and JS ship inside the package and are referenced with plain
{% static %}; no build-tool dependency (django-vite / django-tailwind) is
imposed on consumers. Consumers provide their own Alpine 3 +
@alpinejs/focus (and optionally htmx 2) via their own frontend build; brickwork
registers behaviour onto the host Alpine instance and never calls
Alpine.start().
htmx floor: htmx >= 2.0
brickwork's interaction contracts (the HTMX 422 form-swap loop, toast delivery
via hx-swap-oob, modal dismissal via the HX-Trigger: bw:modal:close response
header, combobox server filtering) are built and CI-gated on htmx >= 2.0
only. htmx 1.9 is out of contract (BR-BW-HTMX-010): htmx 2 changed default
response handling in ways the 422 loop relies on, and the interaction suites only
ever exercise htmx 2. A brownfield app on htmx 1.9 should upgrade htmx to 2.x as a
prerequisite before adopting brickwork's interaction primitives; see
docs/ADOPTION.md.
Contracts
brickwork's public API is five versioned contracts (see the spec): token, template, navigation, interaction (HTMX), and JavaScript (Alpine). Template block names, HTMX target IDs, Alpine component names, event names and token names are semver-governed.
Usage
Tags vs includes
Some components are consumed as template tags, others via {% include %}.
This is deliberate: a component that carries logic (variant validation, a11y
enforcement, icon resolution) ships as a tag so that logic is not duplicated at
every call site; a purely structural component is an include the consumer fills
with context.
-
Tags (load the library first):
{% bw_icon %},{% bw_button %},{% bw_badge %},{% bw_alert %},{% bw_nav %},{% bw_field_widget %}.{% load brickwork_components brickwork_icons brickwork_nav %} {% bw_button label="Save" variant="primary" %} {% bw_badge label="New" variant="info" %}
The
_button.html/_badge.html/_alert.htmltemplate files exist but are the tags' own render targets, not a consumer-facing{% include %}API. Call the tag, not the partial. -
Includes (structure you fill with context):
_page_header.html,_data_table.html,_pagination.html,_empty_state.html,_filter_bar.html,_spinner.html, and the form partialsforms/_field.html/forms/_form_errors.html.{% include "brickwork/components/_data_table.html" with table_id="gadgets" columns=columns rows=rows %}
Icons: decorative or labelled, always
{% bw_icon %} requires exactly one of decorative=True or label="...",
and raises TemplateSyntaxError if given neither or both. This is intentional
(ICO-007, WCAG 4.1.2): an icon is either purely presentational (aria-hidden) or
carries meaning (an accessible name), never ambiguous.
{% bw_icon "search" decorative=True %} {# beside a visible label #}
{% bw_icon "trash" label="Delete item" %} {# standalone, meaningful #}
You rarely call bw_icon directly for the icon inside a bw_button or
bw_nav item: those tags take an icon="..." argument and handle the a11y
pairing for you. Reach for bw_icon directly only for a standalone icon in your
own markup, where this rule applies.
Development
Python package:
pip install -e ".[dev]"
pytest
Frontend build (compiles tokens + component assets into the package's static
dir; see frontend/README.md):
npm install
npm run build
Licence
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_brickwork-1.2.0.tar.gz.
File metadata
- Download URL: django_brickwork-1.2.0.tar.gz
- Upload date:
- Size: 229.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52be070a7db86c4db5168dfaa6f9d05aec68b7642aa99ce72b8309d6e6d6ae85
|
|
| MD5 |
f1f3cb2d371d7b99e7b01cfc3509a925
|
|
| BLAKE2b-256 |
ebd39fd2d379327b60b94f3a7c1e452fdab3c6cb5808966094282acf385ff943
|
Provenance
The following attestation bundles were made for django_brickwork-1.2.0.tar.gz:
Publisher:
publish.yml on icvoss/django-brickwork
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_brickwork-1.2.0.tar.gz -
Subject digest:
52be070a7db86c4db5168dfaa6f9d05aec68b7642aa99ce72b8309d6e6d6ae85 - Sigstore transparency entry: 2335435233
- Sigstore integration time:
-
Permalink:
icvoss/django-brickwork@4337a02e08baa3149d5c88e7f7ca919c3287bc22 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/icvoss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4337a02e08baa3149d5c88e7f7ca919c3287bc22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_brickwork-1.2.0-py3-none-any.whl.
File metadata
- Download URL: django_brickwork-1.2.0-py3-none-any.whl
- Upload date:
- Size: 213.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e494bc1991e04fc8ef7460dfd677bda2202a921bf645fbcbd20de1114894d29
|
|
| MD5 |
cb74c87f75e799e895d2c3e5e42b3c7d
|
|
| BLAKE2b-256 |
d49631c564bf01f77c49c6d070ed9991068d9e03c83737e0d6ec3f2de1a1c781
|
Provenance
The following attestation bundles were made for django_brickwork-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on icvoss/django-brickwork
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_brickwork-1.2.0-py3-none-any.whl -
Subject digest:
9e494bc1991e04fc8ef7460dfd677bda2202a921bf645fbcbd20de1114894d29 - Sigstore transparency entry: 2335435307
- Sigstore integration time:
-
Permalink:
icvoss/django-brickwork@4337a02e08baa3149d5c88e7f7ca919c3287bc22 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/icvoss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4337a02e08baa3149d5c88e7f7ca919c3287bc22 -
Trigger Event:
push
-
Statement type: