Definition

List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.


Code

  • your list content
  • your list content
  • your list content
<ul class="list-group ">
	<li class="list-group-item"><span class="glyphicon glyphicon-arrow-right"></span> your list content</li>
	<li class="list-group-item"><span class="glyphicon glyphicon-arrow-right"></span> your list content</li>
	<li class="list-group-item"><span class="glyphicon glyphicon-arrow-right"></span> your list content</li>
</ul>

Examples

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.

  • your list content
  • your list content
  • your list content
<ul class="list-group ">
 	<li class="list-group-item">your list content</li>
 	<li class="list-group-item">your list content</li>
 	<li class="list-group-item">your list content</li>
</ul>

Badges

Add the badges component to any list group item and it will automatically be positioned on the right.

<ul class="list-group ">
<li class="list-group-item"><span class="badge">44</span>your list content 1 </li>
<li class="list-group-item"><span class="badge">33</span>your list content  2 </li>
<li class="list-group-item"><span class="badge">55</span>your list content  3</li>
</ul>

  • 44your list content 1
  • 33your list content 2
  • 55your list content 3

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.

<div class="list-group">
  <a href="#" class="list-group-item active">
    Carpe diem
  </a>
  <a href="#" class="list-group-item">your list content 1 </a>
  <a href="#" class="list-group-item">your list content 2 </a>
  <a href="#" class="list-group-item">your list content 3 </a>
  <a href="#" class="list-group-item">your list content 4 </a>
</div>

Button items

List group items may be buttons instead of list items (that also means a parent <div> instead of an <ul>). No need for individual parents around each element. Don’t use the standard .btn classes here.

<div class="list-group">
  <button type="button" class="list-group-item">Bella per Emathios</button>
  <button type="button" class="list-group-item">Plus quam in</button>
  <button type="button" class="list-group-item">Ciuilia campos</button>
  <button type="button" class="list-group-item">Iusque datum sceleri canimus</button>
  <button type="button" class="list-group-item">Populumque potentem</button>
</div>





Disabled items

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

<div class="list-group">
  <a href="#" class="list-group-item disabled">
    Cras justo odio
  </a>
  <a href="#" class="list-group-item">Dapibus ac facilisis in</a>
  <a href="#" class="list-group-item">Morbi leo risus</a>
  <a href="#" class="list-group-item">Porta ac consectetur ac</a>
  <a href="#" class="list-group-item">Vestibulum at eros</a>
</div>

Contextual classes

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

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

Custom content

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

<div class="list-group">
  <a href="#" class="list-group-item active">
    <h4 class="list-group-item-heading">List group item heading</h4>
    <p class="list-group-item-text">...</p>
  </a>
</div>

List group item heading

<div class="list-group">
  <a href="#" class="list-group-item active">
    <h4 class="list-group-item-heading">List group item heading</h4>
    <p class="list-group-item-text">...</p>
  </a>
</div>

 

List group item heading

Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.

 

Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.

Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.



Collaborations

Using the following form you can send your collaboration to this page. Thanks in advance.

You have to be logged in order to apply the contribution form.