Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Bs5 List Groups in Bootstrap

Bs5 List Groups in Bootstrap

Absolutely! Here’s a clear overview of Bootstrap 5 List Groups — a versatile way to display lists of content.


? Bootstrap 5 List Groups

List groups allow you to display a series of content in a clean, consistent, and flexible way. You can customize them with badges, links, buttons, and contextual colors.


1. Basic List Group

<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>

2. Active and Disabled Items

<ul class="list-group">  <li class="list-group-item active" aria-current="true">Active item</li>  <li class="list-group-item">Regular item</li>  <li class="list-group-item disabled" tabindex="-1" aria-disabled="true">Disabled item</li></ul>
  • .active highlights the current item.

  • .disabled makes an item visually disabled and non-interactive.


3. List Group with Badges

Add badges to show counts or labels on the right:

<ul class="list-group">  <li class="list-group-item d-flex justify-content-between align-items-center">    Notifications    <span class="badge bg-primary rounded-pill">14</span>  </li>  <li class="list-group-item d-flex justify-content-between align-items-center">    Messages    <span class="badge bg-primary rounded-pill">2</span>  </li></ul>

4. List Groups as Links or Buttons

Make list group items clickable by using <a> or <button> elements with .list-group-item and .list-group-item-action:

<div class="list-group">  <a href="#" class="list-group-item list-group-item-action active" aria-current="true">Active link</a>  <a href="#" class="list-group-item list-group-item-action">Link item</a>  <button type="button" class="list-group-item list-group-item-action">Button item</button></div>

5. Flush List Groups (No Borders and Rounded Corners)

Use .list-group-flush to remove borders and rounded corners for a seamless look:

<ul class="list-group list-group-flush">  <li class="list-group-item">Flush item 1</li>  <li class="list-group-item">Flush item 2</li></ul>

6. Horizontal List Groups

Display list groups horizontally (works well for nav-like lists):

<ul class="list-group list-group-horizontal">  <li class="list-group-item">Item 1</li>  <li class="list-group-item">Item 2</li>  <li class="list-group-item">Item 3</li></ul>

You can make it responsive by adding breakpoint classes like .list-group-horizontal-md.


Summary of Key Classes

ClassPurpose
.list-groupContainer for list group
.list-group-itemEach item in the group
.list-group-item-actionMakes item interactive (links/buttons)
.activeHighlights active item
.disabledDisabled item styling
.list-group-flushRemoves borders and rounded corners
.list-group-horizontalDisplays items in a row horizontally

If you'd like, I can help you build a specific list group with custom content, badges, icons, or interactive features! Just ask.

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql