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

Documentation

Directory

An ordered package or resource directory with optional mark and metadata column.

All components Marketing Brickwork 4.3.1

Try it

Package index

Open full-page preview

Linked names and installation metadata.

Packages

Composable Django UI.

  1. 01

    django-brickwork

    Accessible server-rendered UI.

    4.2.0 Stable pip install django-brickwork
Use for an installable package index, partner directory or resource catalogue.

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/_directory.html" %}

your_app/views.py

Python

context = {'heading': 'Packages', 'lede': 'Composable Django UI.', 'items': [{'number': '01', 'icon': 'folder', 'heading': 'django-brickwork', 'url': '/packages/django-brickwork/', 'body': 'Accessible server-rendered UI.', 'version': '4.2.0', 'status': 'Stable', 'install': 'pip install django-brickwork'}]}

Guide

Add it to your project

  1. Use the public include path "brickwork_marketing/components/_directory.html" from the installed django-brickwork package.
  2. Supply items from view context because they are list-shaped.
  3. Use logo for safe image or SVG markup, otherwise an icon registry name.
  4. Use url only on the entry title, not the entire row.

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.
lede string Not set No Short supporting copy below the section heading. Constraint: No additional template constraint beyond the documented type.
items list of {number?, icon?, logo?, heading, url?, body?, version?, status?, install?} Not set No Directory records: `{number?, icon?, logo?, heading, url?, body?, version?, status?, install?}`. Constraint: Every record needs `heading`. `logo` is trusted HTML and takes precedence over `icon`; `install` is displayed as code.
items[].number string or integer Not set No Visible ordinal; the loop counter is used when it is absent. Constraint: No additional template constraint beyond the documented type.
items[].icon registered icon name Not set No Registered Brickwork icon name; it is rendered decoratively. Constraint: Use a name in the Brickwork icon registry.
items[].heading string Not set No Entry heading rendered for this record. Constraint: No additional template constraint beyond the documented type.
items[].url string Not set No Destination that makes the record’s documented link area interactive. Constraint: No additional template constraint beyond the documented type.
items[].body string Not set No Optional explanatory text for this record. Constraint: No additional template constraint beyond the documented type.
items[].version string Not set No Optional version metadata. Constraint: No additional template constraint beyond the documented type.
items[].status string Not set No Optional status metadata. Constraint: No additional template constraint beyond the documented type.
items[].install string Not set No Optional install command, rendered in a code element. Constraint: No additional template constraint beyond the documented type.

Behaviour

Accessibility and responsive behaviour

Accessibility
Real ordered list with h2 and h3 hierarchy. Icons are decorative; supplied logos need suitable alt text.
Responsive
Stacks below md; four columns from md.
Without JavaScript
Static HTML; no JavaScript required.

Need help?

Troubleshooting

An entry shows an icon instead of its logo.

Supply safe `logo` markup for that item. Logo takes precedence over `icon`; ensure the markup has suitable alternative text.

Explore next

Used in examples

Documentation