The list group component is used to display a series of content, often with active, disabled, or selectable items.
Below are various examples demonstrating different layouts of the list group component.
<ul class="list-group w-50 flex-row">
<li class="list-group-items">
<a>active items</a>
</li>
<li class="list-group-items">
<a>active items</a>
</li>
<li class="list-group-items">
<a>active items</a>
</li>
</ul>
<ol class="list-group w-50 flex-column">
<li class="list-group-items active">
<span>active items</span>
</li>
<li class="list-group-items">
<span>items</span>
</li>
<li class="list-group-items disabled">
<span>disabled items</span>
</li>
<li class="list-group-items">
<span>items</span>
</li>
</ol>
<ul class="list-group-flush-column w-50">
<li class="list-group-items">
<a>active items</a>
</li>
<li class="list-group-items">
<a>active items</a>
</li>
<li class="list-group-items">
<a>active items</a>
</li>
</ul>
<ul class="list-group-flush-row w-50">
<li class="list-group-items">
<a>active items</a>
</li>
<li class="list-group-items">
<a>active items</a>
</li>
<li class="list-group-items">
<a>active items</a>
</li>
</ul>
Class | Description |
---|---|
.list-group | Defines the list group. |
.list-group-items | Applies to each item in the list group. |
.active | Highlights active list items. |
.disabled | Applies disabled styling to items. |
.flex-row | Aligns items horizontally. |
.flex-column | Aligns items vertically. |
The list group supports different options such as active, disabled, and flush styles.