Bootstrap Lists

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.

Bootstrap Typography (Bootstrap 4)

Definition

Bootstrap includes simple and easily customized typography for headings, body text, lists, and more. For even more control, check out the textual utility classes.

 

Code

Examples

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.

Bootstrap Translations

Definition

Community members have translated Bootstrap’s documentation into various languages. None are officially supported by Bootstrap – and they may not always be up to date.

Code

Examples

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.

Bootstrap Accessibility

Definition

Bootstrap follows common web standards and—with minimal extra effort—can be used to create sites that are accessible to those using AT.

Code

Examples

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.

Bootstrap Validators

Definition

In order to provide the best possible experience to old and buggy browsers, Bootstrap uses CSS browser hacks in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren’t yet fully standardized, but these are used purely for progressive enhancement.

These validation warnings don’t matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don’t interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.

Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of a workaround for a certain Firefox bug.

 

Code

Examples

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.

Bootstrap Browser and device support

Definition

Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.

 

Code

Examples

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.