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

Documentation

Avatar group

An overlapping row of avatars with computed overflow count.

All components Component Brickwork 4.3.1

Try it

Overflow group

Open full-page preview

Shows collaborators with a count for the remainder.

Use for collaborators, assignees, or participants when individual portraits can be compacted.

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

{% load brickwork_components %}
{% bw_avatar_group avatars=collaborators max=max size=size %}

your_app/views.py

Python

context = {'collaborators': [{'initials': 'AL', 'aria_label': 'Ada Lovelace'}, {'initials': 'GH', 'aria_label': 'Grace Hopper'}, {'initials': 'MB', 'aria_label': 'Margaret Hamilton'}, {'initials': 'DS', 'aria_label': 'Donald Knuth'}, {'initials': 'LN', 'aria_label': 'Linus Torvalds'}], 'max': 4, 'size': 'sm'}

Guide

Add it to your project

  1. Load `brickwork_components`.
  2. Pass avatar dictionaries to `{% bw_avatar_group %}`.
  3. Set `max` to reserve a final overflow chip when the list is long.

View this component's source for the installed release

Options

Public API

Option Type Default Required Description
avatars list[dict] Not set Yes Avatar dictionaries accepted by the avatar component. Constraint: Each avatar record uses the avatar fields, including a meaningful image alternative or initials fallback.
max int 0 No Maximum visible positions; zero shows every avatar. Constraint: When overflow applies, the final visible position is the +N chip.
size str md No Default child size. Allowed: sm, md, lg. Constraint: Use one of the documented size choices; unsupported values are not a responsive substitute.
shape str circle No Default child shape. Allowed: circle, square. Constraint: Allowed values: `circle`, `square`.

Behaviour

Accessibility and responsive behaviour

Accessibility
The group has an accessible group name; the overflow token is text rather than a control.
Responsive
No breakpoint switch.
Without JavaScript
Static HTML only.

Need help?

Troubleshooting

Contract check: Include-only context (advanced): visible (list), overflow (int), size, shape.

Use the documented visible-avatar and overflow values supplied by the avatar-group preparation path; do not pass an arbitrary overflow label.

Documentation