Button groups are used to wrap a series of buttons on a single line.
To render a button group, wrap a series of buttons in a div and apply the class m-btnGroup
.
<div class="m-btnGroup">
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
</div>
To render a series of buttons vertically, apply the class modifier -vertical
.
<div class="m-btnGroup -vertical">
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
</div>
Use the -pill
modifier class to render a series of buttons with a more pronounced border-radius.
<div class="m-btnGroup -pill">
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
</div>
Button groups can be expanded to fill the parent space by applying the class -fluid
.
<div class="m-btnGroup -fluid">
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
<button class="a-btn">Button</button>
</div>
Button text is centered by default. However, this behavior can change by applying the modifiers
-align--left
or -align--right
.
<div class="m-btnGroup -fluid">
<button class="a-btn -align--left">Button</button>
<button class="a-btn">Button</button>
<button class="a-btn -align--right">Button</button>
</div>
To disable the fluidity of a specific button in a fluid button group, apply the class -notFluid
to the button.
<div class="m-btnGroup -fluid">
<button class="a-btn">Button</button>
<button class="a-btn -notFluid">Button</button>
<button class="a-btn">Button</button>
</div>
Button groups supports a full spectrum of sizes: -sm
, -md
,
-lg
, -xl
.
The default size is -md
.
-sm
-md
-lg
-xl
<div class="m-btnGroup">
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm">Button</button>
</div>
<div class="m-btnGroup -pill">
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm">Button</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -sm">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -sm">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -sm">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -md">Button</button>
<button class="a-btn -md">Button</button>
<button class="a-btn -md">Button</button>
</div>
<div class="m-btnGroup -pill">
<button class="a-btn -md">Button</button>
<button class="a-btn -md">Button</button>
<button class="a-btn -md">Button</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -md">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -md">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -md">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg">Button</button>
</div>
<div class="m-btnGroup -pill">
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg">Button</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -lg">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -lg">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -lg">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl">Button</button>
</div>
<div class="m-btnGroup -pill">
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl">Button</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -xl">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -xl">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -xl">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
-sm
-md
-lg
-xl
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm">Button</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -sm">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -sm">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -sm">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -md">Button</button>
<button class="a-btn -md">Button</button>
<button class="a-btn -md">Button</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -md">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -md">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -md">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg">Button</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -lg">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -lg">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -lg">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl">Button</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup -vertical -fluid">
<button class="a-btn -xl">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -xl">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
<button class="a-btn -xl">
<div class="a-btn__content">
<div class="a-icon">
<svg><use xlink:href="#icon-atom"></use></svg>
</div>
<span>Button</span>
</div>
</button>
</div>
Button groups support all button types and styles, including icons. Mix and match text and icons to form a hybrid button group.
<div class="m-btnGroup">
<button class="a-btn">Button</button>
<button class="a-btn -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg>
<use xlink:href="#icon-atom"></use>
</svg>
</div>
</div>
</button>
</div>
Hybrid buttons also support fluid rendering.
<div class="m-btnGroup -fluid">
<button class="a-btn">Button</button>
<button class="a-btn -icon -notFluid">
<div class="a-btn__content">
<div class="a-icon">
<svg>
<use xlink:href="#icon-atom"></use>
</svg>
</div>
</div>
</button>
</div>
Hybrid buttons supports a full spectrum of sizes: -sm
, -md
,
-lg
, -xl
.
The default size is -md
.
<div class="m-btnGroup">
<button class="a-btn -sm">Button</button>
<button class="a-btn -sm -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg>
<use xlink:href="#icon-atom"></use>
</svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -md">Button</button>
<button class="a-btn -md -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg>
<use xlink:href="#icon-atom"></use>
</svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -lg">Button</button>
<button class="a-btn -lg -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg>
<use xlink:href="#icon-atom"></use>
</svg>
</div>
</div>
</button>
</div>
<div class="m-btnGroup">
<button class="a-btn -xl">Button</button>
<button class="a-btn -xl -icon">
<div class="a-btn__content">
<div class="a-icon">
<svg>
<use xlink:href="#icon-atom"></use>
</svg>
</div>
</div>
</button>
</div>