Bootstrap Buttons Group

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 NameDescriptions
.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

Bootstrap Buttons Example

The following example shows in line buttons group:

See Live Example

The above buttons group example will produce below output:

Bootstrap Button Groups of Different Sizes Example

The following example shows in line buttons group of different sizes:

See Live Example

The following example shows the button groups of different Sizes:

Vertical Buttons Group Example

Bootstrap also supports vertical button groups as well. The following example shows vertical button group:

See Live Example

The above buttons group example will produce below output:

Nesting Button Groups Example

Bootstrap nesting button grouping allows to create dropdown menus. The following example shows nesting button group:

See Live Example

The above buttons group example will produce below output:

Justified Button Groups Example

Bootstrap allows to create justified button dropdown menus. The following example shows justified buttons group:

See Live Example

The above buttons group example will produce below output: