Skip to main content

List groups

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 Example

Result
Loading...
Live Editor

Active items

Set the active prop to indicate the list groups current active selection.

Result
Loading...
Live Editor

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.

Result
Loading...
Live Editor

Actionable items

Toggle the action prop to create actionable list group items, with disabled, hover and active styles. List item actions will render a <button> or <a> (depending on the presence of an href) by default but can be overridden by setting the as prop as usual.

List items actions are distinct from plain items to ensure that click or tap affordances aren't applied to non-interactive items.

Result
Loading...
Live Editor

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.

Result
Loading...
Live Editor

Numbered

Add the numbered prop 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.

Result
Loading...
Live Editor

These work great with custom content as well.

Result
Loading...
Live Editor

Horizontal

Use the horizontal prop to make the ListGroup render horizontally. Currently horizontal list groups cannot be combined with flush list groups.

Result
Loading...
Live Editor

There are responsive variants to horizontal: setting it to {sm|md|lg|xl|xxl} makes the list group horizontal starting at that breakpoint’s min-width.

Result
Loading...
Live Editor

Contextual classes

Use contextual variants on <ListGroup.Item>s to style them with a stateful background and color.

Result
Loading...
Live Editor

When paired with actions, additional hover and active styles apply.

Result
Loading...
Live Editor

Tabbed Interfaces

You can also use the [Tab][tabs] components to create ARIA compliant tabbable interfaces with the <ListGroup> component. Swap out the <Nav> component for the list group and you are good to go.

Result
Loading...
Live Editor

API

ListGroup

ListGroupItem