Skip to content
Fleetline

List group

Usage

Use a list group for a single column of similar items, each with a title and one or two details: upcoming services, mechanics on shift, a vehicle's open work orders. Use a table when people compare several fields across rows, and cards when items need media or more text.

Content: primary text is the object's name; secondary text is one line of context. Trailing meta is short ("12 Nov", "5.5 h", "6 days overdue").

Anatomy

  1. List — <ul class="list-group" role="list">
  2. Row — li.list-group__item
  3. Leading (optional) — .list-group__leading: avatar or icon
  4. Content — .list-group__primary and .list-group__secondary
  5. Trailing meta (optional) — .list-group__meta
  6. Actions (optional) — .list-group__actions
  7. Link (interactive) — a.list-group__link, stretched over the row

Examples

States marked hover and focus-visible are frozen with .is-hover and .is-focus-visible. Those classes share their rule with the real pseudo-class; never use them in product code.

List group

Rows with a leading avatar or icon, primary and secondary text, and trailing meta or actions.

  • Depot north
  • Depot south
  • Mobile workshop van MW-02
  • Pickup PU-012Oil change · last done 14 Mar
    6 days overdue
  • Van KX-219Brake pads · 1,800 km left
    Due soon
  • Truck TR-077Tachograph calibration
    12 Nov
  • WO-4182 · Brake pads, frontVan KX-219 · Marta Quintero
  • WO-4193 · Wiper bladesPickup PU-012 · Marta Quintero
<ul class="list-group" role="list">
  <li class="list-group__item">
    <span class="list-group__leading"><svg class="icon" aria-hidden="true" focusable="false"><use href="#icon-truck"></use></svg></span>
    <div class="list-group__content"><span class="list-group__primary">Pickup PU-012</span><span class="list-group__secondary">Oil change · last done 14 Mar</span></div>
    <span class="list-group__meta"><span class="badge badge--danger"><svg class="badge__icon" aria-hidden="true" focusable="false"><use href="#icon-octagon-alert"></use></svg>6 days overdue</span></span>
  </li>
</ul>

API

HookValuesPurpose
.list-groupblock classBordered list
.list-group--interactivemodifier classHover fill on rows with a .list-group__link
.list-group__item | __leading | __content | __primary | __secondary | __meta | __actionspart classesRow slots
.list-group__linkpart classRow link; focus ring is drawn on the row
aria-current="page"attribute on the linkCurrent row: teal fill and start bar
.is-hover | .is-focus-visibledocs-only class (on the row)Freeze states

Do and don't

Row link "Marta Quintero" + trailing "5.5 h"

Do make the title the link and keep meta as text.

Stretched row link plus Edit and Close buttons in the same row

Don’t mix a whole-row link with several row buttons; pick one.

"6 days overdue" badge

Do say status in words in the meta slot.

<div> rows without a list

Don’t drop list semantics; screen readers announce item counts from ul.

Accessibility

Keyboard interaction
KeyBehavior
TabMoves to each row link, or to each row's action buttons
EnterFollows the row link / activates the focused button

Tokens

Custom propertyPurpose
--color-elevation-surface-raisedList surface
--color-border-defaultBorder and row dividers
--color-action-ghost-bg-hoverRow hover
--color-selected-bg | -fg | -borderCurrent row
--color-text-mutedSecondary text, meta, leading icon
--size-touch-targetMinimum row height
--density-compact-cell-padding-yCompact row padding
--focus-ring-*Row focus ring