List group
A framed list of rows: settings, a side menu, search results, a checklist. Rows can be plain text, links or buttons, with icons, two lines of text, and a badge at the end.
Links
The current row gets aria-current="true" (or "page") and is filled in.
<div class="list-group max-w-sm">
<a class="list-group-item" href="#" aria-current="true"><i class="mi mi-user" aria-hidden="true"></i>Profile</a>
<a class="list-group-item" href="#"><i class="mi mi-bell" aria-hidden="true"></i>Notifications <span class="badge badge-yellow">3</span></a>
<a class="list-group-item" href="#"><i class="mi mi-lock" aria-hidden="true"></i>Privacy</a>
<a class="list-group-item" href="#"><i class="mi mi-credit-card" aria-hidden="true"></i>Billing</a>
<a class="list-group-item" aria-disabled="true"><i class="mi mi-users" aria-hidden="true"></i>Team <small class="ms-auto">Pro plan</small></a>
</div>Two lines
- AMAna MorenoCommented on Homepage2m
- LKLeo KimMoved Pricing page to Done1h
- SOSade OkaforUploaded 3 filesMon
<ul class="list-group max-w-md">
<li class="list-group-item"><span class="avatar bg-yellow-soft">AM</span><span><b>Ana Moreno</b><small>Commented on Homepage</small></span><span class="list-group-end text-sm text-muted">2m</span></li>
<li class="list-group-item"><span class="avatar bg-violet-soft">LK</span><span><b>Leo Kim</b><small>Moved Pricing page to Done</small></span><span class="list-group-end text-sm text-muted">1h</span></li>
<li class="list-group-item"><span class="avatar bg-green-soft">SO</span><span><b>Sade Okafor</b><small>Uploaded 3 files</small></span><span class="list-group-end text-sm text-muted">Mon</span></li>
</ul>Checklist, numbered, side by side
<div class="grid md:grid-cols-2 gap-6">
<div class="list-group">
<label class="list-group-item check"><input type="checkbox" checked> Pick a brand color</label>
<label class="list-group-item check"><input type="checkbox" checked> Write the hero</label>
<label class="list-group-item check"><input type="checkbox"> Add the pricing</label>
</div>
<ol class="list-group list-group-numbered">
<li class="list-group-item">Sign up</li>
<li class="list-group-item">Invite your team</li>
<li class="list-group-item">Make your first project</li>
</ol>
</div>
<div class="list-group list-group-horizontal mt-6">
<a class="list-group-item" href="#" aria-current="true">Day</a>
<a class="list-group-item" href="#">Week</a>
<a class="list-group-item" href="#">Month</a>
</div>Classes
| Class | Does |
|---|---|
.list-group | The frame (ul, ol or div of links / buttons / labels) |
.list-group-item | A row; links, buttons and labels light up on hover |
aria-current / .is-active | The chosen row, filled in |
aria-disabled="true" / disabled | Faded and not clickable |
.list-group-end (or a .badge) | Pushed to the end of the row |
.list-group-flush | No outer frame, to sit inside a card |
ol.list-group-numbered | Numbers in front |
.list-group-horizontal | Rows side by side |
For a menu that opens from a button, use Menu; for a site's side menu, the site sidebar.