Collapse
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.
- An item
- A second item
- A third item
- A fourth item
- And a fifth one
Active items
Add .active
to a .list-group-item
to indicate the current active selection.
- An active item
- A second item
- A third item
- A fourth item
- And a fifth one
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).
- A disabled item
- A second item
- A third item
- A fourth item
- And a fifth one
Links and buttons
Use <a>
s or <button>
s to create actionable list group items with hover, disabled, and active states by adding .list-group-item-action
. We separate these pseudo-classes to ensure list groups made of non-interactive elements (like <li>
s or <div>
s) don’t provide a click or tap affordance.
With <button>
s, you can also make use of the disabled attribute instead of the .disabled
class. Sadly, <a>
s don’t support the disabled attribute.
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).
- An item
- A second item
- A third item
- A fourth item
- And a fifth one
Numbered
Add .list-group-numbered
to add numbers to each list group item.
- A list item
- A list item
- A list item
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|xxl}
to make a list group horizontal starting at that breakpoint’s min-width
. Currently horizontal list groups cannot be combined with flush list groups.
- An item
- A second item
- A third item
- An item
- A second item
- A third item
- An item
- A second item
- A third item
- An item
- A second item
- A third item
- An item
- A second item
- A third item
- An item
- A second item
- A third item
With badges
Add badges to any list group item to show unread counts, activity, and more with the help of some utilities.
- A list item 14
- A second list item 2
- A third list item 1
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 agoSome placeholder content in a paragraph.
And some small print.List group item heading
3 days agoSome placeholder content in a paragraph.
And some muted small print.List group item heading
3 days agoSome placeholder content in a paragraph.
And some muted small print.Checkboxes and radios
Place Bootstrap’s checkboxes and radios within list group items and customize as needed. You can use them without <label>
s, but please remember to include an aria-label
attribute and value for accessibility.