current theme: placeholder

atom :: Button

The button atom uses the .button or its shorthand .bt class. Apply it to <button>, <input type="submit">, or <a> elements for a consistent look.

For accessibility, use <button> for actions and <a> for navigation. If you use <a> as a button, add role="button" and tabindex="0" and aria-disabled="true" if disabled.

File NameclassSource
atom.button.css.button or .btGithub

HTML

You can combine modifiers in any way you like (see examples).

The .bt-outline-white is a special case button useful for dark/image backgrounds such as Heroes and doesn’t change between light/dark themes.

Available modifiersStyle
.bt
.bt.bt-md
.bt.bt-lg
.bt.bt-outline
.bt.bt-outline-white
.bt.bt-primary
.bt.bt-primary.bt-outline
.bt.bt-yes
.bt.bt-yes.bt-outline
.bt.bt-maybe
.bt.bt-maybe.bt-outline
.bt.bt-no
.bt.bt-no.bt-outline
SVG inline inside button
.bt.bt-tightIcon
.bt.bt-text
disabled attribute
<a> as button Link Button
<a> as button (with aria-disabled)Disabled Link Button

Custom properties

The following custom properties are available in the default theme:

PropertyDescription
--bt-font-sizeFont size.
--bt-font-size-lgLarge font size.
--bt-font-weightFont weight.
--bt-colorText color.
--bt-color-hoverText color (hover).
--bt-background-colorBackground color.
--bt-background-color-hoverBackground color (hover).
--bt-border-colorBorder color.
--bt-border-widthBorder width.
--bt-border-radiusBorder radius.
--bt-border-radius-lgLarge border radius.
--bt-outline-color-hoverOutline text color (hover).
--bt-outline-background-color-hoverOutline background color (hover).
--bt-outline-border-colorOutline border color.
--bt-primary-colorPrimary text color.
--bt-primary-color-hoverPrimary text color (hover).
--bt-primary-background-colorPrimary background color.
--bt-primary-background-color-hoverPrimary background color (hover).
--bt-primary-border-colorPrimary border color.
--bt-primary-border-color-hoverPrimary border color (hover).

Examples