Skip to main contentCarbon Design System

Button

Color

Primary button

ClassPropertyColor token
.bx--btn--primarytext color$text-04
.bx--btn__iconsvg$icon-03
.bx--btn--primarybackground-color$interactive-01
:hoverbackground-color$hover-primary
:activebackground-color$active-primary
:focusborder$focus
:focusinset$ui-background
:disabledbackground-color$disabled-02
:disabledtext color$disabled-03
:disabledsvg$disabled-03
Primary button states and color

Secondary button

ClassPropertyColor token
.bx--btn--secondarytext color$text-04
.bx--btn__iconsvg$icon-03
.bx--btn--secondarybackground-color$interactive-02
.bx--btn--secondaryborder$interactive-02
:hoverbackground-color$hover-secondary
:activebackground-color$active-secondary
:focusborder$focus
:focusinset$ui-background
:disabledbackground-color$disabled-02
:disabledtext color$disabled-03
:disabledsvg$disabled-03
Secondary button states and color

Tertiary button

ClassPropertyColor token
.bx--btn--tertiarytext color$interactive-03
.bx--btn__iconsvg$interactive-03
.bx--btn--tertiarybackground-colortransparent
.bx--btn--tertiaryborder$interactive-03
:hovertext color$inverse-01
:hoversvg$icon-03
:hoverbackground-color$hover-tertiary
:activebackground-color$active-tertiary
:focusbackground-color$interactive-03
:focusborder$focus
:focusinset$ui-background
:disabledbackgroundtransparent
:disabledborder$disabled-02
:disabledtext color$disabled-03
:disabledsvg$disabled-02
Tertiary button states and color

Ghost button

ClassPropertyColor token
.bx--btn--ghosttext color$link-01
.bx--btn__iconsvg$link-01
.bx--btn--ghostbackground-color
:hovertext color$hover-primary-text
:hoversvg$hover-primary-text
:hoverbackground-color$hover-ui
:activebackground-color$active-ui
:focusborder$focus
:disabledtext color$disabled-03
:disabledsvg$disabled-02
Ghost button states and color

Ghost button – Icon only


ClassPropertyColor token
.bx--btn__iconsvg$icon-01
.bx--btn--ghostbackground-color
:hoverbackground-color$hover-ui
:activebackground-color$active-ui
:focusborder$focus
:selectedbackground-color$selected-ui
:disabledsvg$disabled-02
Icon only ghost button states and color

Primary danger button

ClassPropertyColor token
.bx--btn--danger--primarytext color$text-04
.bx--btn__iconsvg$icon-03
.bx--btn--danger--primarybackground-color$danger-01
:hoverbackground-color$hover-danger
:activebackground-color$active-danger
:focusborder$focus
:focusinset$ui-background
:disabledbackground-color$disabled-02
:disabledtext color$disabled-03
:disabledsvg$disabled-03
Primary danger button states and color

Tertiary danger button

ClassPropertyColor token
.bx--btn--danger--tertiarytext color$danger-02
.bx--btn__iconsvg$danger-02
.bx--btn--danger--tertiaryborder$danger-02
:hoverbackground-color$hover-danger
:hovertext color$text-04
:hoversvg$icon-03
:activebackground-color$active-danger
:activetext color$text-04
:activesvg$icon-03
:focusborder$focus
:focusinset$ui-background
:disabledbackground-color$disabled-02
:disabledtext color$disabled-03
:disabledsvg$disabled-03
Tertiary danger button states and color

Ghost danger button

ClassPropertyColor token
.bx--btn--danger--ghosttext color$danger-02
.bx--btn__iconsvg$danger-02
:hoverbackground-color$hover-danger
:hovertext color$text-04
:hoversvg$icon-03
:activebackground-color$active-danger
:activetext color$text-04
:activesvg$icon-03
:focusborder$focus
:focusinset$ui-background
:disabledbackground-color$disabled-02
:disabledtext color$disabled-03
:disabledsvg$disabled-03
Ghost danger button states and color

Typography

Button text should be set in sentence case, with only the first word in a phrase and any proper nouns capitalized.

ClassFont-size (px/rem)Font-weightType style
.bx--btn14 / 0.875Regular / 400$body-short-01
.bx--btn--expressive16 / 1Regular / 400$body-short-02

Structure

A button cannot have any element or text within 16 pixels / 1 rem of its borders. For button groups, the primary button is positioned on the outside of the set, while the secondary button is positioned inside. For a button with a glyph, the space between the button label and the glyph must be greater than or equal to 16 pixels / 1 rem. This is to accommodate for instances where two or more buttons with glyphs appear together.

ClassPropertypx / remSpacing token
.bx--btnpadding-left16 / 1$spacing-05
.bx--btnpadding-right64 / 4
.bx--btn--smpadding-left16 / 1$spacing-05
.bx--btn--smpadding-right64 / 4
.bx--btn--ghostpadding-left, padding-right16 / 1$spacing-05
.bx--btn__iconmargin-left, margin-right16 / 1$spacing-05
svgsize16 x 16
.bx--btn--expressive svgsize20 x 20
:focusbox-shadow: inset1px
General button structure

Structure measurements for buttons | px / rem

The following specs are not built into any of the button components but are recommended by design as the proper distance between buttons.

AttributePropertypx / remSpacing token
External: buttonmargin1px-
Button pairingsmargin-left, margin-right0

Sizes

There are four button sizes for use in productive situations—full bleed, default, inline, and small. The large expressive button is used in editorial and digital marketing experiences. See Button sizes on the Usage tab for more information about specific use cases for each button size.

Button sizeHeight (px / rem)Type size (px / token)
Full bleed64 / 414px / \$body-short-01
Default48 / 314px / \$body-short-01
Large expressive48 / 316px / \$body-short-02
Field40 / 2.514px / \$body-short-01
Small32 / 214px / \$body-short-01
Button sizes