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.
If you need a more compact list, add a class .list-group-small which will
reduce the padding of the items in the list.
Add .active to a .list-group-item to indicate the current active
selection. You also need to add extra padding with spacing classes to keep the text from
sticking to the edge of the list and .border-0 to remove borders between
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).
Add .border-0 to the items to remove all the borders.
Add the .list-group-numbered modifier class (and optionally use an
<ol> element) 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.
Numbers are generated by counter-reset on the <ol>, and
then styled and placed with a ::before psuedo-element on the
<li> with counter-increment and content.
These work great with custom content as well.
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 or light list groups.
ProTip: Want equal-width list group items when horizontal? Add
.flex-fill to each list group item.
Use contextual classes to style list items with a stateful background and color.
Contextual classes also work with .list-group-item-action. Note the addition
of the hover styles here not present in the previous example. Also supported is the
.active state; apply it to indicate an active selection on a contextual list
group item.
Conveying meaning to assistive technologies:
Using color to add meaning only provides a visual indication, which will not be conveyed
to users of assistive technologies – such as screen readers. Ensure that information
denoted by the color is either obvious from the content itself (e.g. the visible text), or
is included through alternative means, such as additional text hidden with the
.visually-hidden class.
Add badges to any list group item to show unread counts, activity, and more with the help of some flexbox utilities.
Add nearly any HTML within, even for linked list groups like the one below, with the help of flexbox utilities.
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.
And if you want <label>s as the .list-group-item for large
hit areas, you can do that, too.
Use the tab JavaScript plugin to extend our list group to create tabbable panes of local content.
To make tabs panel fade in, add .fade to each .tab-pane. The
first tab pane must also have .show to make the initial content visible.
A few additional, practical examples with different types of content and elements.
John Doe
john.doe@gmail.com
Alex Ray
alex.ray@gmail.com
Kate Hunington
kate.hunington@gmail.com
John Doe
john.doe@gmail.com
Alex Ray
alex.ray@gmail.com
Kate Hunington
kate.hunington@gmail.com
Soraya Letto
soraya.letto@gmail.com
Zeynep Dudley
zeynep.dudley@gmail.com
Ayat Black
ayat.black@gmail.com
11 March 2020
Some placeholder content in a paragraph relating to "Our company starts its operations". And some more content, used here just to pad out and fill this tab panel. In production, you would obviously have more real content here. And not just text. It could be anything, really. Text, images, forms.
19 March 2020
Some placeholder content in a paragraph relating to "First customer". And some more content, used here just to pad out and fill this tab panel. In production, you would obviously have more real content here. And not just text. It could be anything, really. Text, images, forms.
24 June 2020
Some placeholder content in a paragraph relating to "Our team exceeds 10 people". And some more content, used here just to pad out and fill this tab panel. In production, you would obviously have more real content here. And not just text. It could be anything, really. Text, images, forms.
John Doe
john.doe@gmail.com
Alex Ray
alex.ray@gmail.com
Kate Hunington
kate.hunington@gmail.com
Soraya Letto
soraya.letto@gmail.com
Zeynep Dudley
zeynep.dudley@gmail.com
Ayat Black
ayat.black@gmail.com
John Doe
john.doe@gmail.com
Alex Ray
alex.ray@gmail.com
Kate Hunington
kate.hunington@gmail.com
Michael Bale
michael.bale@gmail.com