Button Groups

Two basic options, along with two more specific variations.

Single button group

Wrap a series of buttons with .btn in .btn-group.

  1. <divclass=“btn-group”>
  2. <buttonclass=“btn”>1</button>
  3. <buttonclass=“btn”>2</button>
  4. <buttonclass=“btn”>3</button>
  5. </div>

Multiple button groups

Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.

  1. <divclass=“btn-toolbar”>
  2. <divclass=“btn-group”>
  3. </div>
  4. </div>

Vertical button groups

Make a set of buttons appear vertically stacked rather than horizontally.

 
  1. <divclass=“btn-group btn-group-vertical”>
  2. </div>

Checkbox and radio flavors

Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View the Javascript docs for that.

Dropdowns in button groups

Heads up! Buttons with dropdowns must be individually wrapped in their own .btn-group within a .btn-toolbar for proper rendering.

Compartir:
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •