Use .ui-button
on any element to create a styled button, or use the <button>
element (with the HTML class). For primary actions, use .ui-button.primary
.
<button class="ui-button [modifier class]">button.ui-button</button>
When a user clicks on a button and there is a state of loading, add a span with .ui-button_loading
before the button text
and it's also generally a good idea to change the text on the button to the present tense.
<button class="ui-button [modifier class]">
<span class="ui-loading_button"></span>
Saving...
</button>
A button group is a series of buttons laid out next to each other. The parent
element should be .button-group
with child .ui-button
s (could be
<button class="ui-button">
). Button groups should be used for a series of
items that are toggle-able (ie, only one button will be "selected" at a time,
like a series of radio buttons).
<div class="ui-button-group">
<a class="ui-button">One</a>
<a class="ui-button">Two</a>
<a class="ui-button is-selected">Three</a>
<a class="ui-button">Four</a>
<a class="ui-button">Five</a>
</div>
Vertical button group
<div class="ui-button-stack">
<a class="ui-button is-selected">One</a>
<a class="ui-button">Two</a>
<a class="ui-button">Three</a>
<a class="ui-button">Four</a>
</div>