Angular Bootstrap List group
Angular list group - Bootstrap 4 & Material Design
Note: This documentation is for an older version of Bootstrap (v.4). A newer
version is available for Bootstrap 5. We recommend migrating to the latest version of our
product -
Material Design for Bootstrap 5.
Go to docs v.5
Basic 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.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
<ul class="list-group">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
Active items
Add .active
to a .list-group-item
to indicate the current active
selection.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
<div class="list-group">
<a href="#" class="list-group-item active waves-light" mdbWavesEffect>Cras justo odio</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Dapibus ac facilisis in</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Morbi leo risus</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Porta ac consectetur ac</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Vestibulum at eros</a>
</div>
Disabled items
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 (e.g., links).
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
<div class="list-group">
<a href="#" class="list-group-item disabled waves-light" mdbWavesEffect>Cras justo odio</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Dapibus ac facilisis in</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Morbi leo risus</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Porta ac consectetur ac</a>
<a href="#" class="list-group-item waves-light" mdbWavesEffect>Vestibulum at eros</a>
</div>
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}
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.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
<ul class="list-group list-group-horizontal">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
</ul>
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
<ul class="list-group list-group-horizontal-sm">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
</ul>
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
<ul class="list-group list-group-horizontal-md">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
</ul>
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
<ul class="list-group list-group-horizontal-lg">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
</ul>
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
<ul class="list-group list-group-horizontal-xl">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
</ul>
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).
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
<ul class="list-group list-group-flush">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
Contextual classes
Use contextual classes to style list items with a stateful background and color.
- Dapibus ac facilisis in
- A simple primary list group item
- A simple secondary list group item
- A simple success list group item
- A simple danger list group item
- A simple warning list group item
- A simple info list group item
- A simple light list group item
- A simple dark list group item
<ul class="list-group">
<li class="list-group-item list-group-item-success">Dapibus ac facilisis in</li>
<li class="list-group-item list-group-item-info">Cras sit amet nibh libero</li>
<li class="list-group-item list-group-item-warning">Porta ac consectetur ac</li>
<li class="list-group-item list-group-item-danger">Vestibulum at eros</li>
</ul>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item list-group-item-info">Cras sit amet nibh libero</a>
<a href="#" class="list-group-item list-group-item-warning">Porta ac consectetur ac</a>
<a href="#" class="list-group-item list-group-item-danger">Vestibulum at eros</a>
</div>
Conveying meaning to assistive technologies
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the
.sr-only
class.
With badges
Add badges to any list group item to show unread counts, activity, and more with the help of some utilities.
- Cras justo odio 14
- Dapibus ac facilisis in 2
- Morbi leo risus 1
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
Cras justo odio
<mdb-badge pill="true" primary="true">14</mdb-badge>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Dapibus ac facilisis in
<mdb-badge pill="true" primary="true">14</mdb-badge>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Morbi leo risus
<mdb-badge pill="true" primary="true">14</mdb-badge>
</li>
</ul>
Custom content
Add nearly any HTML within, even for linked list groups like the one below, with the help of flexbox utilities.
List group item heading
3 days agoDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.List group item heading
3 days agoDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.List group item heading
3 days agoDonec 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 flex-column align-items-start 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 flex-column align-items-start">
<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 flex-column align-items-start">
<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>
Vertical tab MDB Pro component
Use the mdb-tabset
and mdb-tab
elements to create a fully functional
list with tabs.
<!-- Tabset tabs -->
<mdb-tabset [vertical]="true" [buttonClass]="'tabs-white flex-column list-group'" [contentClass]="'vertical'">
<!--Panel 1-->
<mdb-tab heading="<a class='list-group-item'> Home </a>">
<div class="row">
<div class="col-12 waves-light" mdbWavesEffect>
<br>
<p class="h5"> Heading 1 </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam similique, eveniet inventore magni
laborum,
a sed quaerat quam dicta possimus, quos sint veniam. Minus vero quo voluptates, error, quisquam
impedit.</p>
</div>
</div>
</mdb-tab>
<!--Panel 2-->
<mdb-tab heading="<a class='list-group-item'> Profile </a>">
<div class="row">
<div class="col-12 waves-light" mdbWavesEffect>
<br>
<p class="h5"> Heading 2 </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam similique, eveniet inventore magni
laborum,
a sed quaerat quam dicta possimus, quos sint veniam. Minus vero quo voluptates, error, quisquam
impedit.</p>
</div>
</div>
</mdb-tab>
<!--Panel 3-->
<mdb-tab heading="<a class='list-group-item'> Messages </a>">
<div class="row">
<div class="col-12 waves-light" mdbWavesEffect>
<br>
<p class="h5"> Heading 3 </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam similique, eveniet inventore magni
laborum,
a sed quaerat quam dicta possimus, quos sint veniam. Minus vero quo voluptates, error, quisquam
impedit.</p>
</div>
</div>
</mdb-tab>
<!--Panel 4-->
<mdb-tab heading="<a class='list-group-item'> Settings </a>">
<div class="row">
<div class="col-12 waves-light" mdbWavesEffect>
<br>
<p class="h5"> Heading 4 </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam similique, eveniet inventore magni
laborum,
a sed quaerat quam dicta possimus, quos sint veniam. Minus vero quo voluptates, error, quisquam
impedit.</p>
</div>
</div>
</mdb-tab>
</mdb-tabset>