Skip to content

Button

Props

API reference for Button. For usage examples, see the React tab.

Button

NameTypeDefault
childrenChildrenOrFunction<ButtonRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

fullWidthbooleanfalse

Renders the Button in with a fluid width

isDisabledboolean

Whether the button is disabled.

isPendingboolean

Whether the button is in a pending state. This disables press and hover events while retaining the ability to focus, and announces the pending state to screen readers.

size"lg" | "md" | "sm"md

Determines the size of the Button

variant"destructive" | "primary" | "secondary" | "tertiary"primary

Variant for the button.

LinkButton

NameTypeDefault
childrenChildrenOrFunction<LinkRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

downloadstring | boolean

Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN (opens in new tab).

fullWidthboolean | null
hrefstring

A URL to link to. See MDN (opens in new tab).

hrefLangstring

Hints at the human language of the linked URL. SeeMDN (opens in new tab).

isDisabledboolean

Whether the link is disabled.

pingstring

A space-separated list of URLs to ping when the link is followed. See MDN (opens in new tab).

referrerPolicyHTMLAttributeReferrerPolicy

How much of the referrer to send when following the link. See MDN (opens in new tab).

relstring

The relationship between the linked resource and the current page. See MDN (opens in new tab).

routerOptionsundefined

Options for the configured client side router.

size"lg" | "md" | "sm" | null
targetHTMLAttributeAnchorTarget

The target window for the link. See MDN (opens in new tab).

variant"destructive" | "primary" | "secondary" | "tertiary" | null