Lesson 16: List Groups in Bootstrap 5

List groups in Bootstrap 5 are a flexible and powerful component for displaying a series of information. Lets explore how to use list groups in Bootstrap 5 with QuanTriMang.com!

List Groups in Bootstrap 5 are a flexible and powerful component used to display a series of information on websites, apps, etc. Let's explore how to use List Groups in Bootstrap 5 with QuanTriMang.com !

 

Basic list groups in Bootstrap 5

The most basic list group in Bootstrap 5 is an unordered list of items. To create a basic list group, use the `` class .list-group, and ``.

with class .list-group-item:

  • First item
  • Second items
  • Third items

Example for the website TipsMake.com:

 

 Bootstrap Example 

Basic list group on QuanTriMang.com

  • Section 1
  • Section 2
  • Section 3

 

The item is currently active.

Use a class .activeto highlight the current item:

  • Active items
  • Second items
  • Third items

For example, on the website QuanTriMang.com:

 Bootstrap Example 

This item is currently active in the list group on QuanTriMang.com.

  • Section 1
  • Section 2
  • Section 3

 

A list group with linked items

To create a group list with linked items, use `replace`  and `instead` instead of `instead`.

Optionally, add a class .list-group-item-actionif you want the background color to turn gray when you hover your mouse over it:

 First item Second item Third item 

For example, on the website QuanTriMang.com:

 Bootstrap Example 

The list includes linked items on QuanTriMang.com.

 Mục 1 Mục 2 Mục 3 

 

Inactive item

The class .disabledadds a lighter text color to inactive items. And when used on links, it removes the hover effect.

 Disabled item Disabled item Third item 

For example, on the website QuanTriMang.com:

 Bootstrap Example 

The list contains disabled items on QuanTriMang.com.

The `disabled` class colors disabled items more lightly. And when used on links, it removes the hover effect.

 Mục bị vô hiệu hóa Mục bị vô hiệu hóa Mục 3 

 

Remove border

Use classes .list-group-flushto remove some borders and rounded corners:

  • First item
  • Second items
  • Third items
  • fourth item

For example, on the website QuanTriMang.com:

Numbered list group

Use classes .list-group-numberedto create items that are listed with numbers in front of them:

  1. First item
  2. Second items
  3. Third items

For example, on the website QuanTriMang.com:

Horizontal list group

If you want the items in the list to display horizontally (side-by-side instead of above each other), add the .list-group-horizontalclass .list-group:

  • First item
  • Second items
  • Third items
  • fourth item

For example, on the website QuanTriMang.com:

 Bootstrap Example 

Horizontal list grouping on QuanTriMang.com

The class .list-group-horizontal displays the items in the list horizontally:

  • Section 1
  • Section 2
  • Section 3
  • Section 4

 

Context-based classes

Contextual classes can be used to add color to items in a list:

The class colors the items in the list, including: .list-group-item-success, list-group-item-secondary, list-group-item-info, list-group-item-warning, .list-group-item-danger, .list-group-item-primary, list-group-item-dark and list-group-item-light,:

  • Success item
  • Multiple items
  • Internal items
  • Missing item
  • Danger item
  • Primary item
  • Dark item
  • Light item

For example, on the website QuanTriMang.com:

 Bootstrap Example 

Contextual list grouping in QTM

  • Success
  • Additional
  • Information
  • Warning
  • Danger
  • Basic
  • Dark colors
  • Light color

Link items to classes in context.

 Action item Success item Secondary item Info item Warning item Danger item Primary item Dark item Light item 

For example, on the website QuanTriMang.com:

 Bootstrap Example 

Contextually linked items on QuanTriMang

Move your mouse over the linked items to see the cursor effect:

 Action item Success item Secondary item Info item Warning item Danger item Primary item Dark item Light item 

List group with Badge

Combine the class .badgewith the utility/helper class to add badges inside list groups:

  • Inbox 12
  • Ads 50
  • Junk 99

For example, on the website QuanTriMang.com:

Above is everything you need to know about creating list groups in Bootstrap 5. As you can see, it's very easy to create professional list groups for your website by simply changing a few elements when coding with Bootstrap 5 .

Related posts
  • How to customize Bootstrap with Sass

    bootstrap is a fantastic css framework that can help you create stylish and polished websites. some programmers and development teams find that writing code in bootstrap is easier to edit than regular css.
  • Lesson 41: Grid Medium in Bootstrap 5

    in the previous bootstrap 5 lesson, you learned how to create grids with classes for small screens. however, on medium-sized devices with better designs, the grid is often divided 50%/50%.
  • Lesson 40: Small Grid in Bootstrap 5

    continuing our lesson on grids in bootstrap 5, we'll learn how to create the simplest small grid. basically, creating a small grid using bootstrap 5 isn't difficult.
Other Program articles
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup