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">
<h5 class="mb-1">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">
<h5 class="mb-1">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">
<h5 class="mb-1">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">
<span class="form-check mb-0">
<input class="form-check-input me-1" type="checkbox" value="">
Soufflé pastry pie ice
</span>
</label>
<label class="list-group-item">
<span class="form-check mb-0">
<input class="form-check-input me-1" type="checkbox" value="">
Bear claw cake biscuit
</span>
</label>
<label class="list-group-item">
<span class="form-check mb-0">
<input class="form-check-input me-1" type="checkbox" value="">
Tart tiramisu cake
</span>
</label>
<label class="list-group-item">
<span class="form-check mb-0">
<input class="form-check-input me-1" type="checkbox" value="">
Bonbon toffee muffin
</span>
</label>
<label class="list-group-item">
<span class="form-check mb-0">
<input class="form-check-input me-1" type="checkbox" value="">
Dragée tootsie roll
</span>
</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-4 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-4">
<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="ri-computer-line me-2"></i>
Soufflé pastry pie ice</li>
<li class="list-group-item d-flex align-items-center">
<i class="ri-notification-4-line me-2"></i>
Bear claw cake biscuit</li>
<li class="list-group-item d-flex align-items-center">
<i class="ri-headphone-fill me-2"></i>
Tart tiramisu cake</li>
<li class="list-group-item d-flex align-items-center">
<i class="ri-price-tag-3-line me-2"></i>
Bonbon toffee muffin</li>
<li class="list-group-item d-flex align-items-center">
<i class="ri-focus-2-line 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-4">
<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-4">
<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-4">
<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="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center cursor-pointer">
<img src="assets/img/avatars/2.png" alt="User Image" class="rounded-circle me-4 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>
<div class="d-flex align-items-center">
<div class="user-status me-2 d-flex align-items-center">
<span class="badge badge-dot bg-success me-1"></span>
<small>Online</small>
</div>
<small class="text-muted ms-1">13 minutes</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center cursor-pointer">
<img src="assets/img/avatars/8.png" alt="User Image" class="rounded-circle me-4 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>
<div class="d-flex align-items-center">
<div class="user-status me-2 d-flex align-items-center">
<span class="badge badge-dot bg-warning me-1"></span>
<small>Away</small>
</div>
<small class="ms-1 text-muted">11 minutes</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center cursor-pointer">
<img src="assets/img/avatars/4.png" alt="User Image" class="rounded-circle me-4 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>
<div class="d-flex align-items-center">
<div class="user-status me-2 d-flex align-items-center">
<span class="badge badge-dot bg-secondary me-1"></span>
<small>Offline</small>
</div>
<small class="ms-1 text-muted">9 minutes</small>
</div>
</div>
<div class="add-btn">
<button class="btn btn-primary btn-sm">Add</button>
</div>
</div>
</div>
</a>
<a href="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center cursor-pointer">
<img src="assets/img/avatars/11.png" alt="User Image" class="rounded-circle me-4 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>
<div class="d-flex align-items-center">
<div class="user-status me-2 d-flex align-items-center">
<span class="badge badge-dot bg-danger me-1"></span>
<small>In Meeting</small>
</div>
<small class="ms-1 text-muted">15 minutes</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="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center p-4">
<div class="avatar flex-shrink-0 bg-primary d-flex align-items-center justify-content-center rounded me-4"><i class="ri-bootstrap-fill ri-24px text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">Bootstrap is an open source toolkit</h6>
<div class="progress" 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="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center p-4">
<div class="avatar flex-shrink-0 bg-success d-flex align-items-center justify-content-center rounded me-4"><i class="ri-vuejs-fill ri-24px text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">Vue.js is the Progressive JavaScript Framework</h6>
<div class="progress bg-label-success" 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="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center p-4">
<div class="avatar flex-shrink-0 bg-danger d-flex align-items-center justify-content-center rounded me-4"><i class="ri-angularjs-fill ri-24px text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">Angular implements Functional Programming concepts</h6>
<div class="progress bg-label-danger" 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="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center p-4">
<div class="avatar flex-shrink-0 bg-info d-flex align-items-center justify-content-center rounded me-4"><i class="ri-reactjs-line ri-24px text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">List group item heading</h6>
<div class="progress bg-label-info" 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="javascript:void(0);" class="list-group-item list-group-item-action d-flex align-items-center p-4">
<div class="avatar flex-shrink-0 bg-warning d-flex align-items-center justify-content-center rounded me-4"><i class="ri-javascript-fill ri-24px text-white"></i></div>
<div class="w-100">
<h6 class="mb-2">JavaScript is the programming language of the Web</h6>
<div class="progress bg-label-warning" 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>