Drop-Down.com

Bootstrap List Example

Introduction

List group is a highly effective and flexible element which is located in Bootstrap 4. The element is applied for presenting a string or 'list' material. The list group materials can easily be changed and enhanced to support pretty much any sort of information inside having a variety of opportunities accessible for modification in the list itself. These types of list groups may additionally be operated for navigation along with the use of the right modifier class.

In Bootstrap 4, the Bootstrap List Example is a segment which forms the unordered lists in a specific approach considering it paves the way for generating custom made material in system lists without needing to concerned about the performance problem ( given that the language deals with that by itself). ( find more)

Options of Bootstrap List Css:

Shown here are the properties that are easily available just within the list group component in Bootstrap 4:

• Unordered list: Probably the most common style of list group which you may set up in Bootstrap 4 is an unordered list that has a number of things with the appropriate classes. You can easily built upon it using the other alternatives which are readily available in the element.

• Active pieces: You can highlight the existing active selection with just incorporating the

.active
order to a
.list-group-item
This is effective for whenever you wish to create a list of materials that is able for clicking.

• Disabled items: You are able to even de-highlight a list piece making it appear as despite the fact that it has been certainly disabled. You just simply have to add the

.disabled
extension to the
.list-group-item
for accomplishing this.

• Hyper-links and Buttons: With the buttons tag, you can conveniently develop an actionable thing in the Bootstrap List Item which means that you are going to have the ability to bring in hover, active, and disabled states to all of these elements via installing the

.list-group-item-action
possibility. { You are able to disconnect these types of pseudo-classes from the remaining classes to make sure that the non-interactive components in your code like
<div>
or
<li>
are not actually clickable or actionable too. It is advised that you do definitely not use the typical button classes i.e
.btn
here.

• Contextual classes: This is one other awesome function that is part of the list group element that permits you to design each and every list element using a specific color and background. These are mainly helpful for emphasize specific items or sorting all of them according to color-'s code.

• Badges: You are able to also provide badges to a list object to show the unread counts, activity on the thing, and make it easy for various other active components with making use of additional services. ( get more info)

Let us look at some cases

General type

Probably the most fundamental list group is an unordered list plus list items and the correct classes. Build on it using the selections that follow, or else using your particular CSS as wanted.

 Primary  model

<ul class="list-group">
  <li class="list-group-item">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</li>
</ul>

Active elements

Amplify a

.active
to a
.list-group-item
to indicate the current active selection.

Active  elements
<ul class="list-group">
  <li class="list-group-item active">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</li>
</ul>

Disabled elements

Add in

.disabled
to a
.list-group-item
making it seem like disabled. Take note that a number of features with will also call for custom-made JavaScript to entirely turn off their click on situations (e.g., urls).

Disabled  objects
<ul class="list-group">
  <li class="list-group-item disabled">Cras justo odio</li>
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <li class="list-group-item">Morbi leo risus</li>
  <li class="list-group-item">Porta ac consectetur ac</li>
  <li class="list-group-item">Vestibulum at eros</li>
</ul>

Hyperlinks and tabs

Put to use

<a>
as well as
<button>
to develop workable list group pieces with hover, disabled, and active conditions simply by incorporating
.list-group-item-action
We sort these kinds of pseudo-classes to make sure list groups made of non-interactive elements (like
<li>
or
<div>
do not deliver a select or else touch affordance.

Make sure to not employ the usual

.btn
classes in this case.

 Urls and  tabs
<div class="list-group">
  <a href="#" class="list-group-item active">
    Cras justo odio
  </a>
  <a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
  <a href="#" class="list-group-item list-group-item-action">Morbi leo risus</a>
  <a href="#" class="list-group-item list-group-item-action">Porta ac consectetur ac</a>
  <a href="#" class="list-group-item list-group-item-action disabled">Vestibulum at eros</a>
</div>

By using

<button>
you can easily also utilize the
disabled
attribute in place of
.disabled
the class. The sad thing is,
<a>
don't support the disabled feature.

Linking buttons
<div class="list-group">
  <button type="button" class="list-group-item list-group-item-action active">
    Cras justo odio
  </button>
  <button type="button" class="list-group-item list-group-item-action">Dapibus ac facilisis in</button>
  <button type="button" class="list-group-item list-group-item-action">Morbi leo risus</button>
  <button type="button" class="list-group-item list-group-item-action">Porta ac consectetur ac</button>
  <button type="button" class="list-group-item list-group-item-action" disabled>Vestibulum at eros</button>
</div>

Contextual classes

Use contextual classes to mode list elements with a stateful background and also colour.

Contextual classes
<ul class="list-group">
  <li class="list-group-item">Dapibus ac facilisis in</li>
  <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>

Contextual classes as well perform with

.list-group-item-action
Keep in mind the attachment of the hover formats here not present in the previous case. In addition supported is the
.active
employ it to reveal an active selection on a contextual list group unit.

Contextual list
<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-success">Dapibus ac facilisis in</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-info">Cras sit amet nibh libero</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-warning">Porta ac consectetur ac</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-danger">Vestibulum at eros</a>
</div>

Sharing meaning toward assistive technological innovations.

Using different colors to incorporate meaning just produces a graphic signal, that will definitely not be shown to operators of assistive technological innovations -- just like display screen readers. Be sure that information shown with the color tone is either evident from the web content itself (e.g. the visible text message), or else is included through alternative solutions, such as extra text hidden using the

.sr-only
class.

Utilizing badges

Add badges to any kind of list group object to demonstrate unread totals, activity, and much more with help from some utilities. Keep in mind the justify-content-between utility class and the badge's positioning.

 Utilizing badges
<ul class="list-group">
  <li class="list-group-item justify-content-between">
    Cras justo odio
    <span class="badge badge-default badge-pill">14</span>
  </li>
  <li class="list-group-item justify-content-between">
    Dapibus ac facilisis in
    <span class="badge badge-default badge-pill">2</span>
  </li>
  <li class="list-group-item justify-content-between">
    Morbi leo risus
    <span class="badge badge-default badge-pill">1</span>
  </li>
</ul>

Custom-made content

Bring in almost any kind of HTML in, even for related list groups like the one listed below, with the help of flexbox utilities.

Custom  web content
<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action flex-column align-items-start active">
    <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">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
    <small>Donec id elit non mi porta.</small>
  </a>
  <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 class="text-muted">3 days ago</small>
    </div>
    <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
    <small class="text-muted">Donec id elit non mi porta.</small>
  </a>
  <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 class="text-muted">3 days ago</small>
    </div>
    <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
    <small class="text-muted">Donec id elit non mi porta.</small>
  </a>
</div>

Conclusions

In conclusion, list group is a helpful and powerful component within Bootstrap 4 which enables you to create an unordered list even more handled, interactive, and responsive without any ruining on the look or else layout of the list pieces themselves.

Review a number of video short training about Bootstrap list:

Linked topics:

Bootstrap list formal documentation

Bootstrap list  formal  records

Bootstrap list guide

Bootstrap list  guide

Bootstrap list issue

Bootstrap list  problem