Button group
Examples
Base
To render a button group, wrap a series of buttons in a div and apply the class chi-button-group
.
<div class="chi-button-group">
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
</div>
Vertical
To render a series of buttons vertically, apply the class modifier -vertical
.
<div class="chi-button-group -vertical">
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
</div>
Fluid buttons
Button groups can be expanded to fill the parent space by applying the class -fluid
.
Horizontal
<div class="chi-button-group -fluid">
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
</div>
Vertical
<div class="chi-button-group -vertical -fluid">
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
<button class="chi-button">Button</button>
</div>
Sizes
Button groups support the following sizes: -xs
, -sm
, -md
,
-lg
, -xl
.
The default size is -md
.
Horizontal
-xs
-sm
-md
-lg
-xl
<!-- xs -->
<div class="chi-button-group">
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
</div>
<!-- sm -->
<div class="chi-button-group">
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
</div>
<!-- md -->
<div class="chi-button-group">
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
</div>
<!-- lg -->
<div class="chi-button-group">
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
</div>
<!-- xl -->
<div class="chi-button-group">
<button class="chi-button -xl">Button</button>
<button class="chi-button -xl">Button</button>
<button class="chi-button -xl">Button</button>
</div>
Vertical
-xs
-sm
-md
-lg
-xl
<!-- xs -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
</div>
<!-- sm -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
</div>
<!-- md -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
</div>
<!-- lg -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
</div>
<!-- xl -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -xl">Button</button>
<button class="chi-button -xl">Button</button>
<button class="chi-button -xl">Button</button>
</div>
Sizes
Button groups support the following sizes: -xs
, -sm
, -md
,
-lg
.
The default size is -md
.
Horizontal
-xs
-sm
-md
-lg
<!-- xs -->
<div class="chi-button-group">
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
</div>
<!-- sm -->
<div class="chi-button-group">
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
</div>
<!-- md -->
<div class="chi-button-group">
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
</div>
<!-- lg -->
<div class="chi-button-group">
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
</div>
Vertical
-xs
-sm
-md
-lg
<!-- xs -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs">Button</button>
</div>
<!-- sm -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm">Button</button>
</div>
<!-- md -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
<button class="chi-button -md">Button</button>
</div>
<!-- lg -->
<div class="chi-button-group -vertical -fluid">
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg">Button</button>
</div>
Hybrid buttons
Button groups support all button types and styles, including icons. Mix and match text and icons to form a hybrid button group.
<div class="chi-button-group">
<button class="chi-button">Button</button>
<button class="chi-button -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
Hybrid buttons sizes
Hybrid buttons support the following sizes: xs
, sm
, md
,
lg
, xl
.
The default size is md
.
-xs
-sm
-md
-lg
-xl
<!-- xs -->
<div class="chi-button-group">
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- sm -->
<div class="chi-button-group">
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- md -->
<div class="chi-button-group">
<button class="chi-button -md">Button</button>
<button class="chi-button -md -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- lg -->
<div class="chi-button-group">
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- xl -->
<div class="chi-button-group">
<button class="chi-button -xl">Button</button>
<button class="chi-button -xl -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
Hybrid buttons sizes
Hybrid buttons support the following sizes: xs
, sm
, md
,
lg
.
The default size is md
.
-xs
-sm
-md
-lg
<!-- xs -->
<div class="chi-button-group">
<button class="chi-button -xs">Button</button>
<button class="chi-button -xs -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- sm -->
<div class="chi-button-group">
<button class="chi-button -sm">Button</button>
<button class="chi-button -sm -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- md -->
<div class="chi-button-group">
<button class="chi-button -md">Button</button>
<button class="chi-button -md -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>
<!-- lg -->
<div class="chi-button-group">
<button class="chi-button -lg">Button</button>
<button class="chi-button -lg -icon" aria-label="Button action">
<div class="chi-button__content">
<i class="chi-icon icon-atom" aria-hidden="true"></i>
</div>
</button>
</div>