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.
Read the official
Bootstrap Documentation for a full list of
instructions
and other options.
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. Add .list-group
class to
<ul>
or <ol>
and add .list-group-item
class for default
list group.
<ul class="list-group">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
Add .active
to a .list-group-item
to indicate the current active selection.
<ul class="list-group">
<li class="list-group-item active" aria-current="true">An active item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
Add .disabled
to a .list-group-item
to make it appear disabled. Note that
some elements with .disabled
will also require custom JavaScript to fully disable their click
events.
<ul class="list-group">
<li class="list-group-item disabled" aria-disabled="true">A disabled item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
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.
<div class="list-group">
<a href="javascript:void(0);" class="list-group-item list-group-item-action active" aria-current="true">
The current link item
</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action">A second link item</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action">A third link item</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action">A fourth link item</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action disabled" tabindex="-1" aria-disabled="true">A disabled link item</a>
</div>
With <button>
s, you can also make use of the disabled
attribute instead of
the .disabled
class. Sadly, <a>
s don’t support the disabled attribute.
Add data-bs-toggle="button"
to toggle a button’s
active
state. If you’re pre-toggling a button, you must manually add
the
.active
class and
aria-pressed="true"
to the
<button>
.
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action active" aria-current="true">
The current button
</button>
<button type="button" class="list-group-item list-group-item-action">A second item</button>
<button type="button" class="list-group-item list-group-item-action">A third button item</button>
<button type="button" class="list-group-item list-group-item-action">A fourth button item</button>
<button type="button" class="list-group-item list-group-item-action" disabled>A disabled button item</button>
</div>
Add .list-group-flush
to remove some borders and rounded corners to render list group items
edge-to-edge in a parent container
<ul class="list-group list-group-flush">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
<li class="list-group-item">A fourth item</li>
<li class="list-group-item">And a fifth one</li>
</ul>
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
.
<ol class="list-group list-group-numbered">
<li class="list-group-item">Bear claw cake biscuit</li>
<li class="list-group-item">Soufflé pastry pie ice</li>
<li class="list-group-item">Tart tiramisu cake</li>
<li class="list-group-item">Bonbon toffee muffin</li>
<li class="list-group-item">Dragée tootsie roll</li>
</ol>
Use contextual classes to style list items with a stateful background and color.
Contextual classes also work with .list-group-item-action
. Note the addition of the hover styles
here not present in this example. Also supported is the .active
state; apply it to indicate an
active selection on a contextual list group item.
<ul class="list-group">
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item list-group-item-primary">A simple primary list group item</li>
<li class="list-group-item list-group-item-secondary">A simple secondary list group item</li>
<li class="list-group-item list-group-item-success">A simple success list group item</li>
<li class="list-group-item list-group-item-danger">A simple danger list group item</li>
<li class="list-group-item list-group-item-warning">A simple warning list group item</li>
<li class="list-group-item list-group-item-info">A simple info list group item</li>
<li class="list-group-item list-group-item-light">A simple light list group item</li>
<li class="list-group-item list-group-item-dark">A simple dark list group item</li>
</ul>
Add badges or rounded-pills to any list group item to show unread counts, activity, and more with the help of some utilities.
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
Cras justo odio
<span class="badge bg-primary">3</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Dapibus ac facilisis in
<span class="badge bg-primary rounded-pill">2</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Cotton candy sesame
<span class="badge bg-primary">6</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Morbi leo risus
<span class="badge bg-primary rounded-pill">1</span>
</li>
</ul>
Add nearly any HTML within, even for linked list groups like the one below, with the help of flexbox utilities.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active">
<div class="d-flex w-100 justify-content-between">
<h6 class="mb-2">List group item heading</h5>
<small>3 days ago</small>
</div>
<p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
<small>Donec id elit non mi porta.</small>
</a>
<a href="#" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h6 class="mb-2">List group item heading</h5>
<small class="text-muted">3 days ago</small>
</div>
<p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
<small class="text-muted">Donec id elit non mi porta.</small>
</a>
<a href="#" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h6 class="mb-2">List group item heading</h5>
<small class="text-muted">3 days ago</small>
</div>
<p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
<small class="text-muted">Donec id elit non mi porta.</small>
</a>
</div>
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.
<div class="list-group">
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Soufflé pastry pie ice
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Bear claw cake biscuit
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Tart tiramisu cake
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Bonbon toffee muffin
</label>
<label class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="">
Dragée tootsie roll
</label>
</div>
Use the tab JavaScript plugin—include it individually or through the compiled bootstrap.js
file—to extend our list group to create tabbable panes of local content.
<div class="row">
<div class="col-md-4 col-12 mb-3 mb-md-0">
<div class="list-group">
<a class="list-group-item list-group-item-action active" id="list-home-list" data-bs-toggle="list" href="#list-home">Home</a>
<a class="list-group-item list-group-item-action" id="list-profile-list" data-bs-toggle="list" href="#list-profile">Profile</a>
<a class="list-group-item list-group-item-action" id="list-messages-list" data-bs-toggle="list" href="#list-messages">Messages</a>
<a class="list-group-item list-group-item-action" id="list-settings-list" data-bs-toggle="list" href="#list-settings">Settings</a>
</div>
</div>
<div class="col-md-8 col-12">
<div class="tab-content">
<div class="tab-pane fade show active" id="list-home">
Donut sugar plum sweet roll biscuit. Cake oat cake gummi bears. Tart wafer wafer halvah gummi bears cheesecake. Topping croissant cake sweet roll. Dessert fruitcake gingerbread halvah marshmallow pudding bear claw cheesecake. Bonbon dragée cookie gummies. Pudding marzipan liquorice. Sugar plum dragée cupcake cupcake cake dessert chocolate bar. Pastry lollipop lemon drops lollipop halvah croissant. Pastry sweet gingerbread lemon drops topping ice cream.
</div>
<div class="tab-pane fade" id="list-profile">
Muffin lemon drops chocolate chupa chups jelly beans dessert jelly-o. Soufflé gummies gummies. Ice cream powder marshmallow cotton candy oat cake wafer. Marshmallow gingerbread tootsie roll. Chocolate cake bonbon jelly beans lollipop jelly beans halvah marzipan danish pie. Oat cake chocolate cake pudding bear claw liquorice gingerbread icing sugar plum brownie. Toffee cookie apple pie cheesecake bear claw sugar plum wafer gummi bears fruitcake.
</div>
<div class="tab-pane fade" id="list-messages">
Ice cream dessert candy sugar plum croissant cupcake tart pie apple pie. Pastry chocolate chupa chups tiramisu. Tiramisu cookie oat cake. Pudding brownie bonbon. Pie carrot cake chocolate macaroon. Halvah jelly jelly beans cake macaroon jelly-o. Danish pastry dessert gingerbread powder halvah. Muffin bonbon fruitcake dragée sweet sesame snaps oat cake marshmallow cheesecake. Cupcake donut sweet bonbon cheesecake soufflé chocolate bar.
</div>
<div class="tab-pane fade" id="list-settings">
Marzipan cake oat cake. Marshmallow pie chocolate. Liquorice oat cake donut halvah jelly-o. Jelly-o muffin macaroon cake gingerbread candy cupcake. Cake lollipop lollipop jelly brownie cake topping chocolate. Pie oat cake jelly. Lemon drops halvah jelly cookie bonbon cake cupcake ice cream. Donut tart bonbon sweet roll soufflé gummies biscuit. Wafer toffee topping jelly beans icing pie apple pie toffee pudding. Tiramisu powder macaroon tiramisu cake halvah.
</div>
</div>
</div>
</div>
<div class="list-group list-group-horizontal-md text-md-center">
<a class="list-group-item list-group-item-action active" id="home-list-item" data-bs-toggle="list" href="#horizontal-home">Home</a>
<a class="list-group-item list-group-item-action" id="profile-list-item" data-bs-toggle="list" href="#horizontal-profile">Profile</a>
<a class="list-group-item list-group-item-action" id="messages-list-item" data-bs-toggle="list" href="#horizontal-messages">Messages</a>
<a class="list-group-item list-group-item-action" id="settings-list-item" data-bs-toggle="list" href="#horizontal-settings">Settings</a>
</div>
<div class="tab-content mt-3">
<div class="tab-pane fade show active" id="horizontal-home">
Donut sugar plum sweet roll biscuit. Cake oat cake gummi bears. Tart wafer wafer halvah gummi bears cheesecake. Topping croissant cake sweet roll. Dessert fruitcake gingerbread halvah marshmallow pudding bear claw cheesecake. Bonbon dragée cookie gummies. Pudding marzipan liquorice. Sugar plum dragée cupcake cupcake cake dessert chocolate bar. Pastry lollipop lemon drops lollipop halvah croissant. Pastry sweet gingerbread lemon drops topping ice cream.
</div>
<div class="tab-pane fade" id="horizontal-profile">
Muffin lemon drops chocolate chupa chups jelly beans dessert jelly-o. Soufflé gummies gummies. Ice cream powder marshmallow cotton candy oat cake wafer. Marshmallow gingerbread tootsie roll. Chocolate cake bonbon jelly beans lollipop jelly beans halvah marzipan danish pie. Oat cake chocolate cake pudding bear claw liquorice gingerbread icing sugar plum brownie. Toffee cookie apple pie cheesecake bear claw sugar plum wafer gummi bears fruitcake.
</div>
<div class="tab-pane fade" id="horizontal-messages">
Ice cream dessert candy sugar plum croissant cupcake tart pie apple pie. Pastry chocolate chupa chups tiramisu. Tiramisu cookie oat cake. Pudding brownie bonbon. Pie carrot cake chocolate macaroon. Halvah jelly jelly beans cake macaroon jelly-o. Danish pastry dessert gingerbread powder halvah. Muffin bonbon fruitcake dragée sweet sesame snaps oat cake marshmallow cheesecake. Cupcake donut sweet bonbon cheesecake soufflé chocolate bar.
</div>
<div class="tab-pane fade" id="horizontal-settings">
Marzipan cake oat cake. Marshmallow pie chocolate. Liquorice oat cake donut halvah jelly-o. Jelly-o muffin macaroon cake gingerbread candy cupcake. Cake lollipop lollipop jelly brownie cake topping chocolate. Pie oat cake jelly. Lemon drops halvah jelly cookie bonbon cake cupcake ice cream. Donut tart bonbon sweet roll soufflé gummies biscuit. Wafer toffee topping jelly beans icing pie apple pie toffee pudding. Tiramisu powder macaroon tiramisu cake halvah.
</div>
</div>
Adding icon begore the list group item for more user friendly list group.
<ul class="list-group">
<li class="list-group-item d-flex align-items-center">
<i class="bx bx-tv me-2"></i>
Soufflé pastry pie ice</li>
<li class="list-group-item d-flex align-items-center">
<i class="bx bx-bell me-2"></i>
Bear claw cake biscuit</li>
<li class="list-group-item d-flex align-items-center">
<i class="bx bx-support me-2"></i>
Tart tiramisu cake</li>
<li class="list-group-item d-flex align-items-center">
<i class="bx bx-purchase-tag-alt me-2"></i>
Bonbon toffee muffin</li>
<li class="list-group-item d-flex align-items-center">
<i class="bx bx-closet me-2"></i>
Dragée tootsie roll</li>
</ul>
Use .list-group-timeline
class with .list-group
to add timeline variantion. To add
colored bullets of timeline, use .list-group-timeline-{color}
class for bullet colors.
<ul class="list-group list-group-timeline">
<li class="list-group-item list-group-timeline-primary">Bear claw cake biscuit</li>
<li class="list-group-item list-group-timeline-success">Soufflé pastry pie ice</li>
<li class="list-group-item list-group-timeline-warning">Tart tiramisu cake</li>
<li class="list-group-item list-group-timeline-info">Dragée tootsie roll</li>
<li class="list-group-item list-group-timeline-danger">Bonbon toffee muffin</li>
</ul>
Use other components with .list-group
to modify list group as we have used avatar here.
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between">
<div class="li-wrapper d-flex justify-content-start align-items-center">
<div class="avatar avatar-sm me-3">
<span class="avatar-initial rounded-circle bg-label-success">M</span>
</div>
<div class="list-content">
<h6 class="mb-1">List group item heading</h6>
<small class="text-muted">Donec id elit non mi porta.</small>
</div>
</div>
<small>3 days ago</small>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between">
<div class="li-wrapper d-flex justify-content-start align-items-center">
<div class="avatar avatar-sm me-3">
<span class="avatar-initial rounded-circle bg-label-danger">B</span>
</div>
<div class="list-content">
<h6 class="mb-1">List group item heading</h6>
<small class="text-muted">Donec id elit non mi porta.</small>
</div>
</div>
<small>1 day ago</small>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between">
<div class="li-wrapper d-flex justify-content-start align-items-center">
<div class="avatar avatar-sm me-3">
<span class="avatar-initial rounded-circle bg-label-primary">V</span>
</div>
<div class="list-content">
<h6 class="mb-1">List group item heading</h6>
<small class="text-muted">Donec id elit non mi porta.</small>
</div>
</div>
<small>5 days ago</small>
</a>
</div>
User List to display user status variation with image & other information.
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
<img src="assets/img/avatars/2.png" alt="User Image" class="rounded-circle me-3 w-px-50">
<div class="w-100">
<div class="d-flex justify-content-between">
<div class="user-info">
<h6 class="mb-1">Danish sesame snaps halvah</h6>
<small>13 minutes</small>
<div class="user-status">
<span class="badge badge-dot bg-success"></span>
<small>Online</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
<img src="assets/img/avatars/8.png" alt="User Image" class="rounded-circle me-3 w-px-50">
<div class="w-100">
<div class="d-flex justify-content-between">
<div class="user-info">
<h6 class="mb-1">Cake halvah biscuit cheesecake</h6>
<small class="text-muted">11 minutes</small>
<div class="user-status">
<span class="badge badge-dot bg-warning"></span>
<small>Away</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
<img src="assets/img/avatars/4.png" alt="User Image" class="rounded-circle me-3 w-px-50">
<div class="w-100">
<div class="d-flex justify-content-between">
<div class="user-info">
<h6 class="mb-1">Tart cheesecake jujubes caramels</h6>
<small class="text-muted">9 minutes</small>
<div class="user-status">
<span class="badge badge-dot bg-secondary"></span>
<small>Offline</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
<img src="assets/img/avatars/11.png" alt="User Image" class="rounded-circle me-3 w-px-50">
<div class="w-100">
<div class="d-flex justify-content-between">
<div class="user-info">
<h6 class="mb-1">Icing sweet gummies</h6>
<small class="text-muted">15 minutes</small>
<div class="user-status">
<span class="badge badge-dot bg-danger"></span>
<small>In Meeting</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center">
<img src="assets/img/avatars/12.png" alt="User Image" class="rounded-circle me-3 w-px-50">
<div class="w-100">
<div class="d-flex justify-content-between">
<div class="user-info">
<h6 class="mb-1">Chocolate cookie cake sweet</h6>
<small class="text-muted">5 minutes</small>
<div class="user-status">
<span class="badge badge-dot bg-success"></span>
<small>Online</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
</div>
Progressbar variation to show progress report.
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center p-3">
<div class="badge bg-primary rounded p-1 me-3"><i class="bx bxl-bootstrap bx-sm text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">Bootstrap is an open source toolkit</h6>
<div class="progress mt-2" style="height: 5px;">
<div class="progress-bar bg-primary" role="progressbar" style="width: 95%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center p-3">
<div class="badge bg-success rounded p-1 me-3"><i class="bx bxl-vuejs bx-sm text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">Vue.js is the Progressive JavaScript Framework</h6>
<div class="progress mt-2" style="height: 5px;">
<div class="progress-bar bg-success" role="progressbar" style="width: 85%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center p-3">
<div class="badge bg-danger rounded p-1 me-3"><i class="bx bxl-angular bx-sm text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">React implements Functional Programming concepts</h6>
<div class="progress mt-2" style="height: 5px;">
<div class="progress-bar bg-danger" role="progressbar" style="width: 55%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center p-3">
<div class="badge bg-info rounded p-1 me-3"><i class="bx bxl-react bx-sm text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">List group item heading</h6>
<div class="progress mt-2" style="height: 5px;">
<div class="progress-bar bg-info" role="progressbar" style="width: 75%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-center p-3">
<div class="badge bg-warning rounded p-1 me-3"><i class="bx bxl-redux bx-sm text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">Redux, the most popular framework</h6>
<div class="progress mt-2" style="height: 5px;">
<div class="progress-bar bg-warning" role="progressbar" style="width: 65%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</a>
</div>