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

Documentation

Breadcrumbs

A semantic trail from a higher-level location to the current page.

All components Component Brickwork 4.3.1

Try it

Article trail

Open full-page preview

A three-level documentation path.

  1. Docs
  2. Components
  3. Breadcrumbs
Use in the shell breadcrumbs block for pages below the top level.

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/components/_breadcrumbs.html" with crumbs=breadcrumbs %}

your_app/views.py

Python

context = {'breadcrumbs': [{'label': 'Docs', 'url': '/docs/'}, {'label': 'Components', 'url': '/components/'}, {'label': 'Breadcrumbs'}]}

Guide

Add it to your project

  1. Build crumbs in navigation context.
  2. Include the partial in the shell `breadcrumbs` block.
  3. Make the final entry the current page.

View this component's source for the installed release

Options

Public API

Option Type Default Required Description
crumbs list[dict] Not set Yes Ordered `{label, url?}` items. Constraint: Final crumb is rendered current and unlinked; an empty list emits nothing.

Named blocks

Fill these only when you extend the component template. They are not values passed to an include or tag.

Block What it replaces
breadcrumbs Shell breadcrumb region containing this trail. Constraint: Markup-only extension seam; passing a context variable with this name is ignored.

Behaviour

Accessibility and responsive behaviour

Accessibility
An ordered list sits in the shell nav and the current page gets `aria-current="page"`.
Responsive
No component breakpoint; long trails follow the container rules.
Without JavaScript
Static HTML only.

Need help?

Troubleshooting

Contract check: current page is never a link). Intermediate crumbs with a url are

Omit the final crumb URL so the current page is rendered as text with `aria-current="page"`.

Explore next

Used in examples

Documentation