Bootstrap

Bootstrap list Groups

Organize Content with Bootstrap List Groups: Clean and Flexible Lists Made Easy

When displaying lists of items—whether navigation links, messages, or content groups—you want them to be clear, visually appealing, and user-friendly. Bootstrap’s List Groups component is designed exactly for that. It helps you create beautifully styled lists with minimal effort.

What Are Bootstrap List Groups?

List Groups are flexible and powerful components for displaying series of content in a clean, consistent way. Each item in the list can be simple text, links, buttons, or even custom HTML, and Bootstrap styles them automatically for spacing, borders, and hover effects.

Basic List Group

A basic list group is created by adding the .list-group class to a <ul> or <div>, and each item inside has the .list-group-item class:

html
<ul class="list-group">
<li class="list-group-item">First item</li>
<li class="list-group-item">Second item</li>
<li class="list-group-item">Third item</li>
</ul>

This gives you a simple, clean vertical list with borders and padding.

List Groups with Links and Buttons

List groups can include clickable links or buttons:

html
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active" aria-current="true">
Active item
</a>
<a href="#" class="list-group-item list-group-item-action">Second item</a>
<button type="button" class="list-group-item list-group-item-action">Third item</button>
</div>

The .list-group-item-action class makes items respond visually to hover and focus, improving user interaction.

Contextual Classes

Add context colors to list items to indicate statuses or categories:

  • .list-group-item-primary

  • .list-group-item-secondary

  • .list-group-item-success

  • .list-group-item-danger

  • .list-group-item-warning

  • .list-group-item-info

  • .list-group-item-light

  • .list-group-item-dark

Example:

html
<li class="list-group-item list-group-item-success">Success item</li>

Disabled and Active Items

You can mark an item as active or disabled for better user feedback:

html
<li class="list-group-item active">Active item</li>
<li class="list-group-item disabled">Disabled item</li>

Custom Content Within List Items

Bootstrap supports rich content inside list items, such as headings, paragraphs, and badges:

html
<a href="#" class="list-group-item list-group-item-action 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">Some placeholder content in a paragraph.</p>
<small>And some small print.</small>
</a>

Why Use Bootstrap List Groups?

  • Easy way to organize and display lists

  • Works with text, links, buttons, and custom content

  • Responsive and mobile-friendly

  • Consistent styling across browsers


Bootstrap List Groups simplify managing lists of content on your site while keeping your design clean and user-friendly. Try combining them with badges, icons, or buttons to build powerful interfaces!

Leave a Reply

Your email address will not be published. Required fields are marked *