Listgroup
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.
Basic list
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.
Active Item
Set the active prop to indicate the list groups current active selection.
Disabled Items
Set the disabled prop to prevent actions on a <ListGroup.Item>. For elements that aren't naturally disable-able (like anchors) onClick handlers are added that call preventDefault to mimick disabled behavior.
With onClick function parameter, list group will create <button>s, you can also make use of the disabled and active attributes.
Flush
Add the flush variant to remove outer borders and rounded corners to render list group items edge-to-edge in a parent container such as a Card.
Horizontal
Use the horizontal prop to make the ListGroup render horizontally. 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.
Contextual classes
Use contextual variants on <ListGroup.Item>s to style them with a stateful background and color.
With badges
Add <Badge> to any list group item to show unread counts, activity, and more with the help of some utilities.
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.