YouTip LogoYouTip

Bootstrap Button Groups

Button groups allow multiple buttons to be stacked on a single line. This is very useful when you want to align buttons together. You can add optional JavaScript radio button and checkbox styling behavior via the (#). The following table summarizes some important classes provided by Bootstrap for using button groups: | Class | Description | Code Example | | --- | --- | --- | | .btn-group | This class is used to form a basic button group. Place a series of buttons with the class **.btn** inside a **.btn-group**. |
| | .btn-toolbar | This class helps combine multiple
elements into a
, generally for more complex components. | | | .btn-group-lg, .btn-group-sm, .btn-group-xs | These classes can be applied to the entire button group for size adjustment, without needing to adjust the size of each button individually. |
...
...
...
| | .btn-group-vertical | This class makes a group of buttons stack vertically instead of horizontally. |
...
| ## Basic Button Group The following example demonstrates the use of the class **.btn-group** discussed in the table above: ## Example
[Try it Β»](#) The result is as follows: ![Image 1: Basic Button Group](#) ## Button Toolbar The following example demonstrates the use of the class **.btn-toolbar** discussed in the table above: ## Example [Try it Β»](#) The result is as follows: ![Image 2: Button Toolbar](#) ## Button Sizes The following example demonstrates the use of the class **.btn-group-*** discussed in the table above: ## Example
[Try it Β»](#) The result is as follows: ![Image 3: Button Group Sizes](#) ## Nesting You can nest one button group within another, i.e., nest one **.btn-group** inside another **.btn-group**. This is used when you want to combine a dropdown menu with a series of buttons. ## Example
[Try it Β»](#) The result is as follows: ![Image 4: Nested Button Group](#) ## Vertical Button Group The following example demonstrates the use of the class **.btn-group-vertical** discussed in the table above: ## Example
[Try it Β»](#) The result is as follows: ![Image 5: Vertical Button Group](#)
← Bootstrap Button DropdownsBootstrap Dropdowns β†’

YouTip © 2024-2026 | Home | Learn Technology, Build Dreams!

All content is for educational and learning purposes only.