List Group
List groups are a flexible and powerful component for displaying a series of content. Modify and extend them to support just about any content within.
Bootstrap List Group documentationBasic example
The most basic list group is an unordered list with list items and the proper classes. Build upon it with the options that follow, or with your own CSS as needed.
- Dashboard
- Profile
- Tasks
- Projects
- Members
<!-- List Group -->
<ul class="list-group">
<li class="list-group-item active">
<i class="bi-house list-group-icon"></i> Dashboard
</li>
<li class="list-group-item">
<i class="bi-person list-group-icon"></i> Profile
</li>
<li class="list-group-item">
<i class="bi-list-task list-group-icon"></i> Tasks
</li>
<li class="list-group-item">
<i class="bi-layers list-group-icon"></i> Projects
</li>
<li class="list-group-item">
<i class="bi-people list-group-icon"></i> Members
</li>
</ul>
<!-- End List Group -->
Sizes
Use .list-group-sm
class.
- Dashboard
- Profile
- Tasks
- Projects
- Members
<!-- List Group -->
<ul class="list-group list-group-sm">
<li class="list-group-item">
<i class="bi-house list-group-icon"></i> Dashboard
</li>
<li class="list-group-item">
<i class="bi-person list-group-icon"></i> Profile
</li>
<li class="list-group-item">
<i class="bi-list-task list-group-icon"></i> Tasks
</li>
<li class="list-group-item">
<i class="bi-layers list-group-icon"></i> Projects
</li>
<li class="list-group-item">
<i class="bi-people list-group-icon"></i> Members
</li>
</ul>
<!-- End List Group -->
Use .list-group-lg
class.
- Dashboard
- Profile
- Tasks
- Projects
- Members
<!-- List Group -->
<ul class="list-group list-group-lg">
<li class="list-group-item">
<i class="bi-house list-group-icon"></i> Dashboard
</li>
<li class="list-group-item">
<i class="bi-person list-group-icon"></i> Profile
</li>
<li class="list-group-item">
<i class="bi-list-task list-group-icon"></i> Tasks
</li>
<li class="list-group-item">
<i class="bi-layers list-group-icon"></i> Projects
</li>
<li class="list-group-item">
<i class="bi-people list-group-icon"></i> Members
</li>
</ul>
<!-- End List Group -->
Links and buttons
Use <a>
s or <button>
s to create actionable list group items with hover, disabled, and active states by adding .list-group-item-action
. We separate these pseudo-classes to ensure list groups made of non-interactive elements (like <li>
s or <div>
s) don’t provide a click or tap affordance.
Be sure to not use the standard .btn
classes here.
<!-- List Group -->
<div class="list-group">
<a class="list-group-item list-group-item-action active" href="#">
<i class="bi-house list-group-icon"></i> Dashboard
</a>
<a class="list-group-item list-group-item-action" href="#">
<i class="bi-person list-group-icon"></i> Profile
</a>
<a class="list-group-item list-group-item-action" href="#">
<i class="bi-list-task list-group-icon"></i> Tasks
</a>
<a class="list-group-item list-group-item-action" href="#">
<i class="bi-layers list-group-icon"></i> Projects
</a>
<a class="list-group-item list-group-item-action" href="#">
<i class="bi-people list-group-icon"></i> Members
</a>
</div>
<!-- End List Group -->
Flush
Add .list-group-flush
to remove some borders and rounded corners to render list group items edge-to-edge in a parent container (e.g., cards).
- Dashboard
- Profile
- Tasks
- Projects
- Members
<!-- List Group -->
<ul class="list-group list-group-flush">
<li class="list-group-item">
<i class="bi-house list-group-icon"></i> Dashboard
</li>
<li class="list-group-item">
<i class="bi-person list-group-icon"></i> Profile
</li>
<li class="list-group-item">
<i class="bi-list-task list-group-icon"></i> Tasks
</li>
<li class="list-group-item">
<i class="bi-layers list-group-icon"></i> Projects
</li>
<li class="list-group-item">
<i class="bi-people list-group-icon"></i> Members
</li>
</ul>
<!-- End List Group -->
Striped
Use .list-group-striped
to add zebra-striping to list items.
- Dashboard
- Profile
- Tasks
- Projects
- Members
<!-- List Group -->
<ul class="list-group list-group-striped">
<li class="list-group-item">
<i class="bi-house list-group-icon"></i> Dashboard
</li>
<li class="list-group-item">
<i class="bi-person list-group-icon"></i> Profile
</li>
<li class="list-group-item">
<i class="bi-list-task list-group-icon"></i> Tasks
</li>
<li class="list-group-item">
<i class="bi-layers list-group-icon"></i> Projects
</li>
<li class="list-group-item">
<i class="bi-people list-group-icon"></i> Members
</li>
</ul>
<!-- End List Group -->
Numbered
Add the .list-group-numbered
modifier class (and optionally use an <ol>
element) to opt into numbered list group items. Numbers are generated via CSS (as opposed to a <ol>
s default browser styling) for better placement inside list group items and to allow for better customization.
Numbers are generated by counter-reset
on the <ol>
, and then styled and placed with a ::before
psuedo-element on the <li>
with counter-increment
and content
.
- Cras justo odio
- Cras justo odio
- Cras justo odio
<!-- List Group -->
<ol class="list-group list-group-numbered">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Cras justo odio</li>
</ol>
<!-- End List Group -->
These work great with custom content as well.
-
SubheadingCras justo odio
-
SubheadingCras justo odio
-
SubheadingCras justo odio
<ol class="list-group list-group-numbered">
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-semi-bold">Subheading</div>
Cras justo odio
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-semi-bold">Subheading</div>
Cras justo odio
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-semi-bold">Subheading</div>
Cras justo odio
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
</ol>
Horizontal
Add .list-group-horizontal
to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant .list-group-horizontal-{sm|md|lg|xl|xxl}
to make a list group horizontal starting at that breakpoint’s min-width
. Currently horizontal list groups cannot be combined with flush list groups.
ProTip: Want equal-width list group items when horizontal? Add .flex-fill
to each list group item.
- Dashboard
- Profile
- Tasks
<!-- List Group -->
<ul class="list-group list-group-horizontal">
<li class="list-group-item d-sm-flex align-items-sm-center">
<i class="bi-house list-group-icon"></i> Dashboard
</li>
<li class="list-group-item d-sm-flex align-items-sm-center">
<i class="bi-person list-group-icon"></i> Profile
</li>
<li class="list-group-item d-sm-flex align-items-sm-center">
<i class="bi-list-task list-group-icon"></i> Tasks
</li>
<li class="list-group-item">
<i class="bi-layers list-group-icon"></i> Projects
</li>
<li class="list-group-item">
<i class="bi-people list-group-icon"></i> Members
</li>
</ul>
<!-- End List Group -->
With badges
Add badges to any list group item to show unread counts, activity, and more with the help of some utilities.
- Dashboard 14
- Profile 2
- Tasks 1
<!-- List Group -->
<ul class="list-group">
<li class="list-group-item d-flex align-items-center">
<i class="bi-house list-group-icon"></i> Dashboard
<span class="badge bg-primary rounded-pill ms-auto">14</span>
</li>
<li class="list-group-item d-flex align-items-center">
<i class="bi-person list-group-icon"></i> Profile
<span class="badge bg-primary rounded-pill ms-auto">2</span>
</li>
<li class="list-group-item d-flex align-items-center">
<i class="bi-list-task list-group-icon"></i> Tasks
<span class="badge bg-primary rounded-pill ms-auto">1</span>
</li>
</ul>
<!-- End List Group -->
Checkboxes and radios
Place Bootstrap’s checkboxes and radios within list group items and customize as needed. You can use them without <label>
s, but please remember to include an aria-label
attribute and value for accessibility.
- First checkbox
- Second checkbox
- Third checkbox
- Fourth checkbox
- Fifth checkbox
<!-- List Group -->
<ul class="list-group">
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
First checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Second checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Third checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Fourth checkbox
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" aria-label="...">
Fifth checkbox
</li>
</ul>
<!-- End List Group -->
And if you want <label>
s as the .list-group-item
for large hit areas, you can do that, too.
<div class="list-group">
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
First checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Second checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Third checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Fourth checkbox
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Fifth checkbox
</label>
</div>
Start bordered
<!-- List Group -->
<ul class="list-group list-group-flush list-group-start-bordered">
<!-- Item -->
<li class="list-group-item">
<a class="list-group-item-action border-primary" href="#">
<div class="row">
<div class="col-sm mb-2 mb-sm-0">
<h2 class="fw-normal mb-1">12:00 - 03:00 <span class="fs-5 text-body text-uppercase">pm</span></h2>
<h5 class="text-inherit mb-0">Weekly overview</h5>
<span class="text-body small">24 May, 2020</span>
</div>
<div class="col-sm-auto align-self-sm-end">
<!-- Avatar Group -->
<div class="avatar-group avatar-group-sm avatar-circle">
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img9.jpg" alt="Image Description">
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img3.jpg" alt="Image Description">
</span>
<span class="avatar avatar-soft-dark">
<span class="avatar-initials">A</span>
</span>
<span class="avatar avatar-soft-info">
<span class="avatar-initials">S</span>
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img5.jpg" alt="Image Description">
</span>
</div>
<!-- End Avatar Group -->
</div>
</div>
<!-- End Row -->
</a>
</li>
<!-- End Item -->
<!-- Item -->
<li class="list-group-item">
<a class="list-group-item-action border-info" href="#">
<div class="row">
<div class="col-sm mb-2 mb-sm-0">
<h2 class="fw-normal mb-1">04:30 - 04:50 <span class="fs-5 text-body text-uppercase">pm</span></h2>
<h5 class="text-inherit mb-0">Project tasks</h5>
<span class="text-body small">25 May, 2020</span>
</div>
<div class="col-sm-auto align-self-sm-end">
<!-- Avatar Group -->
<div class="avatar-group avatar-group-sm avatar-circle">
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img6.jpg" alt="Image Description">
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img7.jpg" alt="Image Description">
</span>
<span class="avatar avatar-soft-danger">
<span class="avatar-initials">A</span>
</span>
</div>
<!-- End Avatar Group -->
</div>
</div>
</a>
<!-- End Row -->
</li>
<!-- Item -->
<li class="list-group-item">
<a class="list-group-item-action border-danger" href="#">
<div class="row">
<div class="col-sm mb-2 mb-sm-0">
<h2 class="fw-normal mb-1">12:00 - 03:00 <span class="fs-5 text-body text-uppercase">pm</span></h2>
<h5 class="text-inherit mb-0">Monthly reports</h5>
<span class="text-body small">27 May, 2020</span>
</div>
<div class="col-sm-auto align-self-sm-end">
<!-- Avatar Group -->
<div class="avatar-group avatar-group-sm avatar-circle">
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img5.jpg" alt="Image Description">
</span>
<span class="avatar avatar-soft-dark">
<span class="avatar-initials">B</span>
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img8.jpg" alt="Image Description">
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img9.jpg" alt="Image Description">
</span>
</div>
<!-- End Avatar Group -->
</div>
</div>
<!-- End Row -->
</a>
</li>
<!-- End Item -->
<!-- Item -->
<li class="list-group-item">
<a class="list-group-item-action border-warning" href="#">
<div class="row">
<div class="col-sm mb-2 mb-sm-0">
<h2 class="fw-normal mb-1">02:00 - 03:00 <span class="fs-5 text-body text-uppercase">pm</span></h2>
<h5 class="text-inherit mb-0">Monthly reports to the client</h5>
<span class="text-body small">29 May, 2020</span>
</div>
<div class="col-sm-auto align-self-sm-end">
<!-- Avatar Group -->
<div class="avatar-group avatar-group-sm avatar-circle">
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img5.jpg" alt="Image Description">
</span>
<span class="avatar avatar-soft-dark">
<span class="avatar-initials">B</span>
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img8.jpg" alt="Image Description">
</span>
<span class="avatar">
<img class="avatar-img" src="../assets/img/160x160/img9.jpg" alt="Image Description">
</span>
</div>
<!-- End Avatar Group -->
</div>
</div>
<!-- End Row -->
</a>
</li>
<!-- End Item -->
</ul>
<!-- End List Group -->