VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-button-group-nesting/

⇱ Bootstrap 5 Button group Nesting - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Button group Nesting

Last Updated : 8 Nov, 2022

Bootstrap 5 Button group nesting is used to create a dropdown menu mixed with a series of buttons. To make the button group nesting, we will use .btn-group class.

Button group nesting used Class:

  • .btn-group: This class is used to create a button group nesting in a dropdown menu.

Syntax:

<div class="btn-group" 
 role="group" aria-label="">
 ...
</div>
 

Example 1: In this example, we will use .btn-group class to create a button group nesting.

Output:

👁 Image
 

Example 2: In this example, we will use .btn-group-vertical class to create a button group nesting in a vertical way.

Output:

👁 Image
 

Reference: https://getbootstrap.com/docs/5.0/components/button-group/#nesting

Comment

Explore