Bootstrap provides a way to create buttons group in a single line. Usually <div> element is used for group creation. Find below list of classes provided by Bootstrap which you can use for button group creations:
Class Name | Descriptions |
---|---|
.btn-group | Create button group in single line (Horizontal). |
.btn-group-vertical | Create button group in single line (Vertical). |
.btn-group .btn-group-lg | Create large button group. |
.btn-group .btn-group-sm | Create small button group. |
.btn-group btn-group-xs | Create extra small button group. |
.btn-group btn-group-justified | Create justified button group. |
Syntax
The following example shows in line buttons group:
See Live ExampleThe above buttons group example will produce below output:
The following example shows in line buttons group of different sizes:
See Live ExampleThe following example shows the button groups of different Sizes:
Bootstrap also supports vertical button groups as well. The following example shows vertical button group:
See Live ExampleThe above buttons group example will produce below output:
Bootstrap nesting button grouping allows to create dropdown menus. The following example shows nesting button group:
See Live ExampleThe above buttons group example will produce below output:
Bootstrap allows to create justified button dropdown menus. The following example shows justified buttons group:
See Live ExampleThe above buttons group example will produce below output: