<metaname="twitter:description"content="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.">
<metaproperty="og:description"content="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.">
<pclass="bd-lead">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.</p>
<p>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.</p>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Morbi leo risus<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Porta ac consectetur ac<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Vestibulum at eros<spanclass="nt"></li></span>
<p>Add <codeclass="highlighter-rouge">.active</code> to a <codeclass="highlighter-rouge">.list-group-item</code> to indicate the current active selection.</p>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Morbi leo risus<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Porta ac consectetur ac<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Vestibulum at eros<spanclass="nt"></li></span>
<p>Add <codeclass="highlighter-rouge">.disabled</code> to a <codeclass="highlighter-rouge">.list-group-item</code> to make it <em>appear</em> disabled. Note that some elements with <codeclass="highlighter-rouge">.disabled</code> will also require custom JavaScript to fully disable their click events (e.g., links).</p>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Morbi leo risus<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Porta ac consectetur ac<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Vestibulum at eros<spanclass="nt"></li></span>
<p>Use <codeclass="highlighter-rouge"><a></code>s or <codeclass="highlighter-rouge"><button></code>s to create <em>actionable</em> list group items with hover, disabled, and active states by adding <codeclass="highlighter-rouge">.list-group-item-action</code>. We separate these pseudo-classes to ensure list groups made of non-interactive elements (like <codeclass="highlighter-rouge"><li></code>s or <codeclass="highlighter-rouge"><div></code>s) don’t provide a click or tap affordance.</p>
<p>Be sure to <strong>not use the standard <codeclass="highlighter-rouge">.btn</code> classes here</strong>.</p>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Morbi leo risus<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Porta ac consectetur ac<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action disabled"</span><spanclass="nt">></span>Vestibulum at eros<spanclass="nt"></a></span>
<p>With <codeclass="highlighter-rouge"><button></code>s, you can also make use of the <codeclass="highlighter-rouge">disabled</code> attribute instead of the <codeclass="highlighter-rouge">.disabled</code> class. Sadly, <codeclass="highlighter-rouge"><a></code>s don’t support the disabled attribute.</p>
<spanclass="nt"><button</span><spanclass="na">type=</span><spanclass="s">"button"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></button></span>
<spanclass="nt"><button</span><spanclass="na">type=</span><spanclass="s">"button"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Morbi leo risus<spanclass="nt"></button></span>
<spanclass="nt"><button</span><spanclass="na">type=</span><spanclass="s">"button"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Porta ac consectetur ac<spanclass="nt"></button></span>
<spanclass="nt"><button</span><spanclass="na">type=</span><spanclass="s">"button"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="na">disabled</span><spanclass="nt">></span>Vestibulum at eros<spanclass="nt"></button></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-primary"</span><spanclass="nt">></span>This is a primary list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-secondary"</span><spanclass="nt">></span>This is a secondary list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-success"</span><spanclass="nt">></span>This is a success list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-danger"</span><spanclass="nt">></span>This is a danger list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-warning"</span><spanclass="nt">></span>This is a warning list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-info"</span><spanclass="nt">></span>This is a info list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-light"</span><spanclass="nt">></span>This is a light list group item<spanclass="nt"></li></span>
<spanclass="nt"><li</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-dark"</span><spanclass="nt">></span>This is a dark list group item<spanclass="nt"></li></span>
<p>Contextual classes also work with <codeclass="highlighter-rouge">.list-group-item-action</code>. Note the addition of the hover styles here not present in the previous example. Also supported is the <codeclass="highlighter-rouge">.active</code> state; apply it to indicate an active selection on a contextual list group item.</p>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action"</span><spanclass="nt">></span>Dapibus ac facilisis in<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-primary"</span><spanclass="nt">></span>This is a primary list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-secondary"</span><spanclass="nt">></span>This is a secondary list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-success"</span><spanclass="nt">></span>This is a success list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-danger"</span><spanclass="nt">></span>This is a danger list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-warning"</span><spanclass="nt">></span>This is a warning list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-info"</span><spanclass="nt">></span>This is a info list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-light"</span><spanclass="nt">></span>This is a light list group item<spanclass="nt"></a></span>
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"list-group-item list-group-item-action list-group-item-dark"</span><spanclass="nt">></span>This is a dark list group item<spanclass="nt"></a></span>
<h4id="conveying-meaning-to-assistive-technologies">Conveying meaning to assistive technologies</h4>
<p>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 <codeclass="highlighter-rouge">.sr-only</code> class.</p>
</div>
<h2id="with-badges">With badges</h2>
<p>Add badges to any list group item to show unread counts, activity, and more with the help of some <ahref="/docs/4.0/utilities/flex/">utilities</a>.</p>
<p>Add nearly any HTML within, even for linked list groups like the one below, with the help of <ahref="/docs/4.0/utilities/flex/">flexbox utilities</a>.</p>
<spanclass="nt"><h5</span><spanclass="na">class=</span><spanclass="s">"mb-1"</span><spanclass="nt">></span>List group item heading<spanclass="nt"></h5></span>
<spanclass="nt"><small></span>3 days ago<spanclass="nt"></small></span>
<spanclass="nt"></div></span>
<spanclass="nt"><p</span><spanclass="na">class=</span><spanclass="s">"mb-1"</span><spanclass="nt">></span>Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.<spanclass="nt"></p></span>
<spanclass="nt"><small></span>Donec id elit non mi porta.<spanclass="nt"></small></span>
<spanclass="nt"><h5</span><spanclass="na">class=</span><spanclass="s">"mb-1"</span><spanclass="nt">></span>List group item heading<spanclass="nt"></h5></span>
<spanclass="nt"><small</span><spanclass="na">class=</span><spanclass="s">"text-muted"</span><spanclass="nt">></span>3 days ago<spanclass="nt"></small></span>
<spanclass="nt"></div></span>
<spanclass="nt"><p</span><spanclass="na">class=</span><spanclass="s">"mb-1"</span><spanclass="nt">></span>Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.<spanclass="nt"></p></span>
<spanclass="nt"><small</span><spanclass="na">class=</span><spanclass="s">"text-muted"</span><spanclass="nt">></span>Donec id elit non mi porta.<spanclass="nt"></small></span>
<spanclass="nt"><h5</span><spanclass="na">class=</span><spanclass="s">"mb-1"</span><spanclass="nt">></span>List group item heading<spanclass="nt"></h5></span>
<spanclass="nt"><small</span><spanclass="na">class=</span><spanclass="s">"text-muted"</span><spanclass="nt">></span>3 days ago<spanclass="nt"></small></span>
<spanclass="nt"></div></span>
<spanclass="nt"><p</span><spanclass="na">class=</span><spanclass="s">"mb-1"</span><spanclass="nt">></span>Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.<spanclass="nt"></p></span>
<spanclass="nt"><small</span><spanclass="na">class=</span><spanclass="s">"text-muted"</span><spanclass="nt">></span>Donec id elit non mi porta.<spanclass="nt"></small></span>
<p>Use the tab JavaScript plugin—include it individually or through the compiled <codeclass="highlighter-rouge">bootstrap.js</code> file—to extend our list group to create tabbable panes of local content.</p>
<divclass="tab-pane fade show active"id="list-home"role="tabpanel"aria-labelledby="list-home-list">
<p>Velit aute mollit ipsum ad dolor consectetur nulla officia culpa adipisicing exercitation fugiat tempor. Voluptate deserunt sit sunt nisi aliqua fugiat proident ea ut. Mollit voluptate reprehenderit occaecat nisi ad non minim tempor sunt voluptate consectetur exercitation id ut nulla. Ea et fugiat aliquip nostrud sunt incididunt consectetur culpa aliquip eiusmod dolor. Anim ad Lorem aliqua in cupidatat nisi enim eu nostrud do aliquip veniam minim.</p>
<p>Cupidatat quis ad sint excepteur laborum in esse qui. Et excepteur consectetur ex nisi eu do cillum ad laborum. Mollit et eu officia dolore sunt Lorem culpa qui commodo velit ex amet id ex. Officia anim incididunt laboris deserunt anim aute dolor incididunt veniam aute dolore do exercitation. Dolor nisi culpa ex ad irure in elit eu dolore. Ad laboris ipsum reprehenderit irure non commodo enim culpa commodo veniam incididunt veniam ad.</p>
<p>Ut ut do pariatur aliquip aliqua aliquip exercitation do nostrud commodo reprehenderit aute ipsum voluptate. Irure Lorem et laboris nostrud amet cupidatat cupidatat anim do ut velit mollit consequat enim tempor. Consectetur est minim nostrud nostrud consectetur irure labore voluptate irure. Ipsum id Lorem sit sint voluptate est pariatur eu ad cupidatat et deserunt culpa sit eiusmod deserunt. Consectetur et fugiat anim do eiusmod aliquip nulla laborum elit adipisicing pariatur cillum.</p>
<p>Irure enim occaecat labore sit qui aliquip reprehenderit amet velit. Deserunt ullamco ex elit nostrud ut dolore nisi officia magna sit occaecat laboris sunt dolor. Nisi eu minim cillum occaecat aute est cupidatat aliqua labore aute occaecat ea aliquip sunt amet. Aute mollit dolor ut exercitation irure commodo non amet consectetur quis amet culpa. Quis ullamco nisi amet qui aute irure eu. Magna labore dolor quis ex labore id nostrud deserunt dolor eiusmod eu pariatur culpa mollit in irure.</p>
<spanclass="nt"><div</span><spanclass="na">class=</span><spanclass="s">"tab-pane fade show active"</span><spanclass="na">id=</span><spanclass="s">"list-home"</span><spanclass="na">role=</span><spanclass="s">"tabpanel"</span><spanclass="na">aria-labelledby=</span><spanclass="s">"list-home-list"</span><spanclass="nt">></span>...<spanclass="nt"></div></span>
<p>You can activate a list group navigation without writing any JavaScript by simply specifying <codeclass="highlighter-rouge">data-toggle="list"</code> or on an element. Use these data attributes on <codeclass="highlighter-rouge">.list-group-item</code>.</p>
<p>You can activate individual list item in several ways:</p>
<figureclass="highlight"><pre><codeclass="language-js"data-lang="js"><spanclass="nx">$</span><spanclass="p">(</span><spanclass="s1">'#myList a[href="#profile"]'</span><spanclass="p">).</span><spanclass="nx">tab</span><spanclass="p">(</span><spanclass="s1">'show'</span><spanclass="p">)</span><spanclass="c1">// Select tab by name</span>
<spanclass="nx">$</span><spanclass="p">(</span><spanclass="s1">'#myList a:first'</span><spanclass="p">).</span><spanclass="nx">tab</span><spanclass="p">(</span><spanclass="s1">'show'</span><spanclass="p">)</span><spanclass="c1">// Select first tab</span>
<spanclass="nx">$</span><spanclass="p">(</span><spanclass="s1">'#myList a:last'</span><spanclass="p">).</span><spanclass="nx">tab</span><spanclass="p">(</span><spanclass="s1">'show'</span><spanclass="p">)</span><spanclass="c1">// Select last tab</span>
<spanclass="nx">$</span><spanclass="p">(</span><spanclass="s1">'#myList li:eq(2) a'</span><spanclass="p">).</span><spanclass="nx">tab</span><spanclass="p">(</span><spanclass="s1">'show'</span><spanclass="p">)</span><spanclass="c1">// Select third tab (0-indexed)</span></code></pre></figure>
<h3id="fade-effect">Fade effect</h3>
<p>To make tabs panel fade in, add <codeclass="highlighter-rouge">.fade</code> to each <codeclass="highlighter-rouge">.tab-pane</code>. The first tab pane must also have <codeclass="highlighter-rouge">.show</code> to make the initial content visible.</p>
<spanclass="nt"><div</span><spanclass="na">class=</span><spanclass="s">"tab-pane fade show active"</span><spanclass="na">id=</span><spanclass="s">"home"</span><spanclass="na">role=</span><spanclass="s">"tabpanel"</span><spanclass="nt">></span>...<spanclass="nt"></div></span>
<p>Activates a list item element and content container. Tab should have either a <codeclass="highlighter-rouge">data-target</code> or an <codeclass="highlighter-rouge">href</code> targeting a container node in the DOM.</p>
<p>Selects the given list item and shows its associated pane. Any other list item that was previously selected becomes unselected and its associated pane is hidden. <strong>Returns to the caller before the tab pane has actually been shown</strong> (for example, before the <codeclass="highlighter-rouge">shown.bs.tab</code> event occurs).</p>
<p>When showing a new tab, the events fire in the following order:</p>
<ol>
<li><codeclass="highlighter-rouge">hide.bs.tab</code> (on the current active tab)</li>
<li><codeclass="highlighter-rouge">show.bs.tab</code> (on the to-be-shown tab)</li>
<li><codeclass="highlighter-rouge">hidden.bs.tab</code> (on the previous active tab, the same one as for the <codeclass="highlighter-rouge">hide.bs.tab</code> event)</li>
<li><codeclass="highlighter-rouge">shown.bs.tab</code> (on the newly-active just-shown tab, the same one as for the <codeclass="highlighter-rouge">show.bs.tab</code> event)</li>
</ol>
<p>If no tab was already active, the <codeclass="highlighter-rouge">hide.bs.tab</code> and <codeclass="highlighter-rouge">hidden.bs.tab</code> events will not be fired.</p>
<td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
</tr>
<tr>
<td>shown.bs.tab</td>
<td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
</tr>
<tr>
<td>hide.bs.tab</td>
<td>This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the current active tab and the new soon-to-be-active tab, respectively.</td>
</tr>
<tr>
<td>hidden.bs.tab</td>
<td>This event fires after a new tab is shown (and thus the previous active tab is hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the previous active tab and the new active tab, respectively.</td>