Skip to main content

Button

A clickable item that performs an action. Buttons are used to drive a user through a flow and, optionally, give them contextual information about the action they are about to take.

Polymorphic Component

By default, content is rendered inside a <button>, but this can be overriden by passing any valid tag name or component with the as prop.

Examples

Default Button (Medium Primary)

<Button>Default</Button>

Brand

<Button buttonType="primary" state="brand" size="{small|medium|large}" disabled="{true|false}" icon="{iconName}">
CTA
<ButtonMeta>Meta primary</ButtonMeta>
</Button>

Brand Dark

<Button buttonType="primary" state="dark" size="{small|medium|large}" disabled="{true|false}" icon="{iconName}">
CTA
<ButtonMeta>Meta primary</ButtonMeta>
</Button>

Critical

<Button buttonType="primary" state="critical" size="{small|medium|large}" disabled="{true|false}" icon="{iconName}">
CTA
<ButtonMeta>Meta primary</ButtonMeta>
</Button>

Success

<Button buttonType="primary" state="success" size="{small|medium|large}" disabled="{true|false}" icon="{iconName}">
CTA
<ButtonMeta>Meta primary</ButtonMeta>
</Button>

Props

NameTypeDefault ValueRequiredDescription
buttonType"text" | ButtonType | "primary" | "secondary"ButtonType.PrimaryNoWhich type of button should be rendered?
flushbooleanfalseNoRender a text button with no padding?
icon"head" | "circle" | "placeholder" | IconName | "accordion-caret-down" | "accordion-caret-up" | "amex" | "caret-down" | "check" | "dash" | "diners-club" | "discover" | ... 6 more ...NoAn icon to display within the button.
loadingbooleanfalseNoDisplay the loading state?
size"small" | "medium" | "large" | ButtonSizeButtonSize.MediumNoHow large should the button be?
state"critical" | "success" | ButtonState | "brand" | "dark"ButtonState.BrandNoWhich color should the button be?

Enums

ButtonSize

KeyValue
Small"small"
Medium"medium"
Large"large"

ButtonState

KeyValue
Brand"brand"
Dark"dark"
Critical"critical"
Success"success"

ButtonType

KeyValue
Primary"primary"
Secondary"secondary"
Text"text"