Skip to content

IconButton

Props

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

IconButton

NameTypeDefault
children (required)ReactElement<unknown, string | JSXElementConstructor<any>>

The content of the icon button.

isDisabledboolean

Whether the button is disabled.

isPendingboolean

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

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

Determines the size of the IconButton.

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

Variant for the icon button.

LinkIconButton

NameTypeDefault
children (required)ReactElement<unknown, string | JSXElementConstructor<any>>

The content of the icon button.

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).

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).

inlineboolean | null
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" | "xs"xs

Determines the size of the LinkIconButton.

targetHTMLAttributeAnchorTarget

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

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

Variant for the icon button.