.btn
class, with an additional class for a skin such as .btn--primary
.button
and a
).The majority of the buttons on our apps are either primary or secondary buttons. There should usually only be one primary button per page. Tertiary buttons are meant to be used alongside other primary or secondary buttons (not by themselves).
<button class="btn btn--primary">Primary</button>
<button class="btn btn--secondary">Secondary</button>
<button class="btn btn--tertiary">Tertiary</button>
We use white buttons on top of some dark backgrounds and semi-transparent buttons over images.
<button class="btn btn--white">White</button>
<button class="btn btn--semi-trans">Semi-transparent</button>
Buttons that have just an icon inside use a .i-lg
icon and need a third class .btn--icon
along with .btn
and a skin.
<button class="btn btn--outline inline-flex align-items-center mr1"><i class="i i-download mr1"></i>Download</button>
<button class="btn btn--icon btn--outline"><i class="i i-settings i-lg"></i></button>
disabled
buttons automatically receive this styling.
<button class="btn btn--default" disabled="disabled">Disabled</button>
Use .btn--sm
for small buttons and .sm:btn--block
for buttons that turn into full width on mobile.
<button class="btn btn--outline sm:btn--block mr1">Block on mobile</button>
<button class="btn btn--outline mr1">Default</button>
<button class="btn btn--outline btn--sm">Small</button>
We try to use button groups whenever there is a line of three or more buttons in a row. Wrap a series of buttons with .btn
in .btn-group
with .clearfix
. The currently-selected button must have the class .bg--gray-200
(see the "Left" example below).
<div class="btn-group clearfix">
<button class="btn btn--outline bg--gray-200">Left</button>
<button class="btn btn--outline">Middle</button>
<button class="btn btn--outline">Right</button>
</div>