Bootstrap List GroupsBootstrap list group is used to create a group of list with list items. The most basic list group is an unordered list containing list items. The class ".list-group" within the <ul> element and the class ".list-group-item" within the <li>element are used to create a basic list group. Bootstrap List Group ExampleTest it NowBootstrap List Group with BadgesThe badges can also be added to a list group. They will automatically be positioned to the right side. You have to create a <span> element with class ".badge" inside the list item to create a badge. Test it NowBootstrap List Groups with HyperlinksYou can also link items to the list group. This provides a grey background color on hover. You have to use <div> instead of <ul> and <a> instead of <li> element to create a list group with linked items. Test it NowBootstrap List Group: Display active itemThe class ".active" is used to highlight the current item. It specifies that the specific item is in active state. Test it NowBootstrap List Group: Display a disable itemThe class ".disabled" is used to disable a specific item in the list group. Test it NowBootstrap List Group: Contextual ClassesYou can add colors to the list items by using contextual classes. The following classes are used for coloring list items:
Link items with Contextual ClassesIn Bootstrap 4, you can also link items with contextual classes. Example:Test it NowNext TopicBootstrap Dropdown |