Skip to main content
brickwork
GitHub Log in Get started
Display
Theme
Density
Direction
Brand

Documentation

Stat band

A display-scale metric band that forwards records to core stat tiles.

All components Marketing Brickwork 4.3.1

Try it

Plain proof figures

Open full-page preview

Start-aligned metrics without card chrome.

Measured impact

Faster delivery 42% increased increased
Average launch cycle 18 days
Use for a small set of measurable proof points.

Use it

Working invocation

This code creates the configuration shown above. Copy the template and the required Python context together.

templates/your_app/component.html

Django template

{% include "brickwork_marketing/components/_stat_band.html" %}

your_app/views.py

Python

context = {'heading': 'Measured impact', 'align': 'start', 'chrome': 'plain', 'stats': [{'value': '42%', 'label': 'Faster delivery', 'trend': 'up', 'trend_label': 'increased'}, {'value': '18 days', 'label': 'Average launch cycle'}]}

Guide

Add it to your project

  1. Use the public include path "brickwork_marketing/components/_stat_band.html" from the installed django-brickwork package.
  2. Supply stats from context.
  3. Every trend needs trend_label because the forwarded stat tile requires it.
  4. Use align="start" and chrome="plain" together for bare proof figures.

View this component's source for the installed release

Options

Public API

Option Type Default Required Description
heading string Not set No Section heading rendered as an `<h2>` by this marketing component. Constraint: Keep it in outline order beneath the page hero h1.
stats list of {value, label, trend?, trend_label?} Not set No Metric records: `{value, label, trend?, trend_label?}` forwarded to the core stat tile. Constraint: Every record needs `value` and `label`; `trend_label` is required whenever `trend` is provided.
stats[].value string Not set No Primary metric value passed to the core stat tile. Constraint: No additional template constraint beyond the documented type.
stats[].label string Not set No Text label for the metric. Constraint: No additional template constraint beyond the documented type.
stats[].trend string Not set No Trend direction/value passed to the stat tile. Constraint: No additional template constraint beyond the documented type.
stats[].trend_label string Not set No Required when trend is supplied. Constraint: Required whenever `stats[].trend` is supplied.
align string center No Aligns the heading and metric grid centrally or at the inline start. Allowed: center, start. Constraint: Use only this component’s documented choices.
chrome string card No Forwarded tile chrome. Allowed: card, plain. Constraint: Allowed values: `card`, `plain`.

Behaviour

Accessibility and responsive behaviour

Accessibility
Heading is h2; forwarded stat tiles provide trend accessibility.
Responsive
Auto-fit grid adapts continuously; start alignment pins tiles to the inline start.
Without JavaScript
Static values; no JavaScript required.

Need help?

Troubleshooting

A trend fails accessibility checks.

Every stat that supplies `trend` must also supply a readable `trend_label`; pass both through the stats record.

Explore next

Used in examples

Documentation