Rate this docs

Vue Bootstrap List Group

Vue List Group - Bootstrap 4 & Material Design

Vue Bootstrap list group is a flexible component which displays not only simple list of elements but complex custom content.


Basic example

The most basic list group is simply an unordered list with list items and the proper classes. Build upon it with the options that follow, or your own CSS as needed.

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

        <mdb-list-group>
          <mdb-list-group-item>Cras justo odio</mdb-list-group-item>
          <mdb-list-group-item>Dapibus ac facilisis in</mdb-list-group-item>
          <mdb-list-group-item>Morbi leo risus</mdb-list-group-item>
          <mdb-list-group-item>Porta ac consectetur ac</mdb-list-group-item>
          <mdb-list-group-item>Vestibulum at eros</mdb-list-group-item>
        </mdb-list-group>
      

Labels

Add labels to any list group item to show unread counts, activity, etc.

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

        <mdb-list-group>
          <mdb-list-group-item>Cras justo odio<badge color="primary" pill>14</badge>
          </mdb-list-group-item>
          <mdb-list-group-item>Dapibus ac facilisis in<badge color="primary" pill>2</badge>
          </mdb-list-group-item>
          <mdb-list-group-item>Morbi leo risus<badge color="primary" pill>1</badge>
          </mdb-list-group-item>
        </mdb-list-group>
      

Linked items

Linkify list group items by using anchor tags instead of list items (that also means a parent <div> instead of an <ul>). No need for individual parents around each element.


        <mdb-list-group>
          <mdb-list-group-item :active="true">Cras justo odio</mdb-list-group-item>
          <mdb-list-group-item>Dapibus ac facilisis in</mdb-list-group-item>
          <mdb-list-group-item>Morbi leo risus</mdb-list-group-item>
          <mdb-list-group-item>Porta ac consectetur ac</mdb-list-group-item>
          <mdb-list-group-item>Vestibulum at eros</mdb-list-group-item>
        </mdb-list-group>
      

Links and buttons

Use <a>s or <button>s to create actionable list group items with hover, disabled, and active states by adding :action="true". 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.

Be sure to not use the standard .btn classes here.


        <mdb-list-group>
          <mdb-list-group-item :action="true" :active="true">Cras justo odio</mdb-list-group-item>
          <mdb-list-group-item :action="true">Dapibus ac facilisis in</mdb-list-group-item>
          <mdb-list-group-item :action="true">Morbi leo risus</mdb-list-group-item>
          <mdb-list-group-item :action="true">Porta ac consectetur ac</mdb-list-group-item>
          <mdb-list-group-item :action="true">Vestibulum at eros</mdb-list-group-item>
        </mdb-list-group>
      

Disabled item

Add disabled to a <mdb-list-group-item> to gray it out to appear disabled.


        <mdb-list-group>
          <mdb-list-group-item disabled>Cras justo odio</mdb-list-group-item>
          <mdb-list-group-item>Dapibus ac facilisis in</mdb-list-group-item>
          <mdb-list-group-item>Morbi leo risus</mdb-list-group-item>
          <mdb-list-group-item>Porta ac consectetur ac</mdb-list-group-item>
          <mdb-list-group-item>Vestibulum at eros</mdb-list-group-item>
        </mdb-list-group>
      

Contextual classes

Use contextual classes to style list items, default or linked. Also includes .active state.

  • Dapibus ac facilisis in
  • Cras sit amet nibh libero
  • Porta ac consectetur ac
  • Vestibulum at eros


        <mdb-list-group>
          <mdb-list-group-item class="list-group-item-success">Dapibus ac facilisis in</mdb-list-group-item>
          <mdb-list-group-item class="list-group-item-info">Cras sit amet nibh libero</mdb-list-group-item>
          <mdb-list-group-item class="list-group-item-warning">Porta ac consectetur ac</mdb-list-group-item>
          <mdb-list-group-item class="list-group-item-danger">Vestibulum at eros</mdb-list-group-item>
        </mdb-list-group>
        
        <mdb-list-group>
          <mdb-list-group-item :action="true" class="list-group-item-success">Dapibus ac facilisis in</mdb-list-group-item>
          <mdb-list-group-item :action="true" class="list-group-item-info">Cras sit amet nibh libero</mdb-list-group-item>
          <mdb-list-group-item :action="true" class="list-group-item-warning">Porta ac consectetur ac</mdb-list-group-item>
          <mdb-list-group-item :action="true" class="list-group-item-danger">Vestibulum at eros</mdb-list-group-item>
        </mdb-list-group>
      

Custom content

Add nearly any HTML within, even for linked list groups like the one below.


        <mdb-list-group>
          <mdb-list-group-item href="#" :action="true" :active="true" class="flex-column align-items-start">
            <div class="d-flex w-100 justify-content-between">
              <h5 class="mb-1">List group item heading</h5>
              <small>3 days ago</small>
            </div>
            <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
            <small>Donec id elit non mi porta.</small>
          </mdb-list-group-item>
          <mdb-list-group-item href="#" :action="true" class="flex-column align-items-start">
            <div class="d-flex w-100 justify-content-between">
              <h5 class="mb-1">List group item heading</h5>
              <small class="text-muted">3 days ago</small>
            </div>
            <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
            <small class="text-muted">Donec id elit non mi porta.</small>
          </mdb-list-group-item>
          <mdb-list-group-item href="#" :action="true" class="flex-column align-items-start">
            <div class="d-flex w-100 justify-content-between">
              <h5 class="mb-1">List group item heading</h5>
              <small class="text-muted">3 days ago</small>
            </div>
            <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
            <small class="text-muted">Donec id elit non mi porta.</small>
          </mdb-list-group-item>
        </mdb-list-group>
      

List Group - API

In this section you will find advanced information about the List Group component. You will learn which modules are required in this component, what are the possibilities of configuring the component, and what events and methods you can use in working with it.


Import statement


import { mdbListGroup, mdbListGroupItem } from 'mdbvue';
      

API Reference: Properties

Name Type Default Description Example
tag String 'ul' Changes list group's wrapper tag <mdb-list-group tag="div" />