List
List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.
The most basic list group is simply an unordered list with list items, and the proper classes.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
Add the badges component to any list group item and it will automatically be positioned on the right.
- 7 Cras justo odio
- 2 Dapibus ac facilisis in
- 1 Morbi leo risus
- 4 Porta ac consectetur ac
- 8 Vestibulum at eros
Linkify list group items by using anchor tags instead of list items. No need for individual parents around each element.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
List group items may be buttons instead of list items. No need for individual parents around each element. Don't use the standard .btn
classes here.
Add .disabled
to a .list-group-item
to gray it out to appear disabled.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo risus
- Porta ac consectetur ac
- Vestibulum at eros
Use contextual classes to style list items, default or linked. Also includes .active
state.
- Porta ac consectetur ac
- Dapibus ac facilisis in
- Cras sit amet nibh libero
- Porta ac consectetur ac
- Vestibulum at eros
Add nearly any HTML within, even for linked list groups like the one below.
-
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.
Contextual classes also work with .list-group-item-action
.Also supported is the .active
state; apply it to indicate an active selection on a contextual list group item.
- Dapibus ac facilisis in
- This is a primary list group item
- This is a secondary list group item
- This is a success list group item
- This is a danger list group item
- This is a warning list group item
- This is a info list group item
- This is a light list group item
- This is a dark list group item