A compact list of people for pages where a grid of cards would take too much space: a small heading and a Bootstrap 6 list group where each row shows a round avatar, a name, a role and a colored department badge. Use it for a magazine masthead, a contact page, a project team in documentation or a staff list in a CMS.
How it works
The wrapper div holds an h3 and a ul.list-group.shadow-sm, the Bootstrap 6 list group with rounded corners and hairline separators. Every row is an li.list-group-item.py-4 with one paragraph inside.
- The paragraph is a flex row:
.d-flex.flex-wrap.align-items-center.column-gap-4.row-gap-1. It keeps the avatar, name, role and badge on one line on desktop and lets them wrap neatly on phones. - The avatar is a 40px
img.rounded-circle. - The name is
strong, the role aspan.fs-sm.fg-3. - The badge is
.badge.badge-subtlewith a theme class and.ms-auto, which pushes it to the right edge.
Customization
- Use
.list-group-flushand drop.shadow-smfor a borderless list inside a card or sidebar. - Replace the badges with email links, for example a link with
.ms-auto.fs-sm. - Change badge colors with
.theme-primary,.theme-success,.theme-accent,.theme-warningor.theme-info. - Increase the row height with
.py-5and the avatars withwidth="48"andheight="48". - Add more rows by duplicating an
li; the list grows without layout changes.
Accessibility
The people are a real ul, so screen readers announce the number of team members. Names are bold text, which keeps the heading outline short. Avatars carry alt text; switch to an empty alt if the name alone is enough. Department badges repeat information as text, not only through color.
Usage notes
The block contains no custom CSS and no JavaScript, only Bootstrap 6 (6.0.0-alpha.1) classes, so it can be pasted into any page, CMS field or newsletter template where the Bootstrap 6 stylesheet is loaded. It is also part of the WDS Editor snippet library: enable it with snippets: { framework: 'bootstrap6' } and insert it from the block picker, then edit every text in place.