List Group

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

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
                      
                        <ul class="list-group">
                          <li class="list-group-item">Cras justo odio</li>
                          <li class="list-group-item">Dapibus ac facilisis in</li>
                          <li class="list-group-item">Morbi leo risus</li>
                          <li class="list-group-item">Porta ac consectetur ac</li>
                          <li class="list-group-item">Vestibulum at eros</li>
                        </ul>
                      
                    

Active items

Add .active to a .list-group-item to indicate the current active selection.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros
                      
                        <ul class="list-group">
                          <li class="list-group-item active">Cras justo odio</li>
                          <li class="list-group-item">Dapibus ac facilisis in</li>
                          <li class="list-group-item">Morbi leo risus</li>
                          <li class="list-group-item">Porta ac consectetur ac</li>
                          <li class="list-group-item">Vestibulum at eros</li>
                        </ul>
                      
                    

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).

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros
                      
                        <ul class="list-group">
                          <li class="list-group-item disabled">Cras justo odio</li>
                          <li class="list-group-item">Dapibus ac facilisis in</li>
                          <li class="list-group-item">Morbi leo risus</li>
                          <li class="list-group-item">Porta ac consectetur ac</li>
                          <li class="list-group-item">Vestibulum at eros</li>
                        </ul>
                      
                    

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).

  • Cras justo odio
  • Dapibus ac facilisis in
  • Morbi leo risus
  • Porta ac consectetur ac
  • Vestibulum at eros
                      
                        <ul class="list-group list-group-flush">
                          <li class="list-group-item">Cras justo odio</li>
                          <li class="list-group-item">Dapibus ac facilisis in</li>
                          <li class="list-group-item">Morbi leo risus</li>
                          <li class="list-group-item">Porta ac consectetur ac</li>
                          <li class="list-group-item">Vestibulum at eros</li>
                        </ul>
                      
                    

Contextual classes

Use contextual classes 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
                      
                        <ul class="list-group">
                          <li class="list-group-item">Dapibus ac facilisis in</li>
                          <li class="list-group-item list-group-item-primary">A simple primary list group item</li>
                          <li class="list-group-item list-group-item-secondary">A simple secondary list group item</li>
                          <li class="list-group-item list-group-item-success">A simple success list group item</li>
                          <li class="list-group-item list-group-item-danger">A simple danger list group item</li>
                          <li class="list-group-item list-group-item-warning">A simple warning list group item</li>
                          <li class="list-group-item list-group-item-info">A simple info list group item</li>
                          <li class="list-group-item list-group-item-light">A simple light list group item</li>
                          <li class="list-group-item list-group-item-dark">A simple dark list group item</li>
                        </ul>
                      
                    

With badges

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

                      
                        <div class="list-group">
                          <a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#">
                            Home
                            <span class="badge badge-primary badge-light">14</span>
                          </a>
                          <a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#">
                            Profile
                            <span class="badge badge-danger">New</span>
                          </a>
                          <a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#">
                            <span>Messages <span class="d-block small text-muted">Secondary text</span></span>
                            <span class="badge badge-info badge-pill">1</span>
                          </a>
                          <a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#">
                            Settings
                            <span class="badge badge-secondary badge-pill">Pro</span>
                          </a>
                          <a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center disabled" href="#">
                            <span>Notifications - <span class="small">disabled</span></span>
                            <span class="badge badge-primary">7</span>
                          </a>
                        </div>
                      
                    

Custom content

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

  • Htmlstream

    Jane Moris Pro saved your pin

    5 minutes ago
  • Htmlstream

    Alberta Watson is offering free coffee

    12 minutes ago
  • Htmlstream

    Htmlstream sent you a message

    56 minutes ago
  • Htmlstream

    Edmon Low Free saved your pin

    2 hours ago
                      
                        <ul class="list-group">
                          <li class="list-group-item">
                            <div class="media">
                              <div class="d-flex mr-3">
                                <img class="rounded-circle shadow mt-1" width="40" height="40" src="../assets/img-temp/avatars/img4.jpg" alt="Htmlstream">
                              </div>
                              <div class="media-body">
                                <p class="mb-0"><span class="text-black">Jane Moris</span> <span class="badge badge-primary mr-1">Pro</span> saved your pin</p>
                                <span class="small text-muted">5 minutes ago</span>
                              </div>
                            </div>
                          </li>

                          <li class="list-group-item">
                            <div class="media">
                              <div class="d-flex mr-3">
                                <img class="rounded-circle shadow mt-1" width="40" height="40" src="../assets/img-temp/avatars/user-unknown.jpg" alt="Htmlstream">
                              </div>
                              <div class="media-body">
                                <p class="mb-0"><span class="text-black">Alberta Watson</span> is offering free coffee</p>
                                <span class="small text-muted">12 minutes ago</span>
                              </div>
                            </div>
                          </li>

                          <li class="list-group-item">
                            <div class="media">
                              <div class="d-flex mr-3">
                                <img class="rounded-circle shadow mt-1" width="40" height="40" src="../assets/img-temp/avatars/hs.jpg" alt="Htmlstream">
                              </div>
                              <div class="media-body">
                                <p class="mb-0"><span class="text-black">Htmlstream</span> sent you a message</p>
                                <span class="small text-muted">56 minutes ago</span>
                              </div>
                            </div>
                          </li>

                          <li class="list-group-item">
                            <div class="media">
                              <div class="d-flex mr-3">
                                <img class="rounded-circle shadow mt-1" width="40" height="40" src="../assets/img-temp/avatars/img1.jpg" alt="Htmlstream">
                              </div>
                              <div class="media-body">
                                <p class="mb-0"><span class="text-black">Edmon Low</span> <span class="badge badge-secondary mr-1">Free</span> saved your pin</p>
                                <span class="small text-muted">2 hours ago</span>
                              </div>
                            </div>
                          </li>
                        </ul>
                      
                    
  • Image description

    Chad Cannon Pro

    I hate peeping Toms. For one thing they usually step

  • Image description

    Patrick Ortega

    Forget Ebay and other forms of advertising for your property

  • Image description

    Brandon Baldwin Pro

    I want to talk about to things that are quite important to me

                      
                        <ul class="list-group"&rt;
                          <!-- List Group Item --&rt;
                          <li class="list-group-item"&rt;
                            <div class="media align-items-center"&rt;
                              <!-- Avatar --&rt;
                              <div class="u-avatar-with-indicator position-relative mr-3"&rt;
                                <img class="u-avatar-md rounded-circle" src="../assets/img-temp/avatars/img1.jpg" alt="Image description"&rt;
                                <span class="u-indicator u-indicator-bottom-right u-indicator-sm bg-success mr-2"&rt;</span&rt;
                              </div&rt;
                              <!-- End Avatar --&rt;

                              <!-- Title and Short Text --&rt;
                              <div class="media-body"&rt;
                                <h4 class="mb-1"&rt;
                                  Chad Cannon
                                  <span class="badge badge-pill badge-xs badge-primary-soft ml-2"&rt;Pro</span&rt;
                                </h4&rt;
                                <p class="text-muted mb-0"&rt;I hate peeping Toms. For one thing they usually step</p&rt;
                              </div&rt;
                              <!-- End Title and Short Text --&rt;
                            </div&rt;
                          </li&rt;
                          <!-- End List Group Item --&rt;

                          <!-- List Group Item --&rt;
                          <li class="list-group-item"&rt;
                            <div class="media align-items-center"&rt;
                              <!-- Avatar --&rt;
                              <div class="u-avatar-with-indicator position-relative mr-3"&rt;
                                <img class="u-avatar-md rounded-circle" src="../assets/img-temp/avatars/img2.jpg" alt="Image description"&rt;
                                <span class="u-indicator u-indicator-bottom-right u-indicator-sm bg-warning mr-2"&rt;</span&rt;
                              </div&rt;
                              <!-- End Avatar --&rt;

                              <!-- Title and Short Text --&rt;
                              <div class="media-body"&rt;
                                <h4 class="mb-1"&rt;Patrick Ortega</h4&rt;
                                <p class="text-muted mb-0"&rt;Forget Ebay and other forms of advertising for your property</p&rt;
                              </div&rt;
                              <!-- End Title and Short Text --&rt;
                            </div&rt;
                          </li&rt;
                          <!-- End List Group Item --&rt;

                          <!-- List Group Item --&rt;
                          <li class="list-group-item"&rt;
                            <div class="media align-items-center"&rt;
                              <!-- Avatar --&rt;
                              <div class="u-avatar-with-indicator position-relative mr-3"&rt;
                                <img class="u-avatar-md rounded-circle" src="../assets/img-temp/avatars/img3.jpg" alt="Image description"&rt;
                                <span class="u-indicator u-indicator-bottom-right u-indicator-sm bg-success mr-2"&rt;</span&rt;
                              </div&rt;
                              <!-- End Avatar --&rt;

                              <!-- Title and Short Text --&rt;
                              <div class="media-body"&rt;
                                <h4 class="mb-1"&rt;
                                  Brandon Baldwin
                                  <span class="badge badge-pill badge-xs badge-primary-soft ml-2"&rt;Pro</span&rt;
                                </h4&rt;
                                <p class="text-muted mb-0"&rt;I want to talk about to things that are quite important to me</p&rt;
                              </div&rt;
                              <!-- End Title and Short Text --&rt;
                            </div&rt;
                          </li&rt;
                          <!-- End List Group Item --&rt;
                        </ul&rt;
                      
                    

JavaScript behavior

For more information, see the official Bootstrap documentation.