List group

React Bootstrap 5 List group component

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.

Note: Read the API tab to find all available options and advanced customization


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.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros

Small

If you need a more compact list, pass small as prop which will reduce the padding of the items in the list.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros

Active items

Add active property to a <MDBListGroupItem> to indicate the current active selection.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros

Disabled items

Add disabled property to a <MDBListGroupItem> 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).

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros


No borders

Pass noBorders as a prop to the items to remove all the borders.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros

Numbered

Pass numbered as a 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 groupt items and allow for better customization.

Numbers are generated by counter-reset on the <ol>, and then styled and placed with a ::before pseudo-element on the <li> with counter-increment and content.

  1. Cras justo odio
  2. Cras justo odio
  3. Cras justo odio

These work great with custom content as well.

  1. Subheading
    Cras justo odio
    14
  2. Subheading
    Cras justo odio
    14
  3. Subheading
    Cras justo odio
    14

Horizontal

Add horizontal property to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant using horizontalSize="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.

ProTip: Want equal-width list group items when horizontal? Add .flex-fill to each list group item.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus

Contextual classes

Use color property to style list items with a stateful background and color.

  • Dapibus ac facilisis in
  • A simple primary list group item
  • A simple secondary list group item
  • A simple success list group item
  • A simple danger list group item
  • A simple warning list group item
  • A simple info list group item
  • A simple light list group item
  • A simple dark list group item

color property also works with action property. 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.


Badges

Add badges to any list group item to show unread counts, activity, and more with the help of some flexbox utilities.

  • Cras justo odio 14
  • Dapibus ac facilisis in 2
  • Morbi leo risus 1

Custom content

Add nearly any HTML within, even for linked list groups like the one below, with the help of flexbox utilities.

  • John Doe
    john.doe@gmail.com
    Active
  • Alex Ray
    alex.ray@gmail.com
    Onboarding
  • Kate Hunington
    kate.hunington@gmail.com
    Awaiting

Checkboxes

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.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros

And if you want tag="label"s as the <MDBListGroupItem> property for large hit areas, you can do that, too.


  • JavaScript behavior

    Use the tab JavaScript plugin to extend our list group to create tabbable panes of local content.


    Additional examples

    A few additional, practical examples with different types of content and elements.

    Images

    • John Doe

      john.doe@gmail.com

      Active
    • Alex Ray

      alex.ray@gmail.com

      Onboarding
    • Kate Hunington

      kate.hunington@gmail.com

      Awaiting

    Headings

    Marketing team
    • John Doe

      john.doe@gmail.com

    • Alex Ray

      alex.ray@gmail.com

    • Kate Hunington

      kate.hunington@gmail.com

    Design team
    • Soraya Letto

      soraya.letto@gmail.com

    • Zeynep Dudley

      zeynep.dudley@gmail.com

    • Ayat Black

      ayat.black@gmail.com

    Action buttons

    • John Doe

      john.doe@gmail.com

      View
    • Alex Ray

      alex.ray@gmail.com

      View
    • Kate Hunington

      kate.hunington@gmail.com

      View

    CTA

    • Our company starts its operations

      11 March 2020

      Lorem ipsum dolor sit amet consectetur adipisicing elit. Sit necessitatibus adipisci, ad alias, voluptate pariatur officia repellendus repellat inventore fugit perferendis totam dolor voluptas et corrupti distinctio maxime corporis optio?

    • First customer

      19 March 2020

      Quisque ornare dui nibh, sagittis egestas nisi luctus nec. Sed aliquet laoreet sapien, eget pulvinar lectus maximus vel. Phasellus suscipit porta mattis.

    • Our team exceeds 10 people

      24 June 2020

      Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla ullamcorper arcu lacus, maximus facilisis erat pellentesque nec. Duis et dui maximus dui aliquam convallis. Quisque consectetur purus erat, et ullamcorper sapien tincidunt vitae.

    View all

    Grid list

    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

    Complex grid list

    John Doe

    john.doe@gmail.com

    Active

    Alex Ray

    alex.ray@gmail.com

    Onboarding

    Kate Hunington

    kate.hunington@gmail.com

    Awaiting

    Michael Bale

    michael.bale@gmail.com

    Removed