Button

The Button component is used to trigger actions.

Usage

Default Button

<Button>Primary</Button>

Props

Data table
TypeDescription
_targetReact.HTMLAttributeAnchorTargetOptional target for link rendering. Example: "_blank", "_self", "_parent", "_top"
aria-atomicbooleanWhether assistive technologies should treat live updates as atomic.
aria-busybooleanIndicates whether the element is busy. Usually derived automatically from `loading`.
aria-controlsstringIdentifies the element controlled by this button, such as a menu, dialog, accordion panel, or disclosure region.
aria-currentboolean | "page" | "step" | "location" | "date" | "time"Indicates that this button represents the current item within a set. Most useful when rendering as a link-like control.
aria-describedbystringReferences the element(s) that describe this button. Useful for extra instructions or status messaging.
aria-disabledbooleanIndicates whether the control is perceivable as disabled to assistive tech. Usually derived automatically when rendered as a disabled link.
aria-expandedbooleanIndicates whether the controlled element is expanded or collapsed. Commonly used for disclosure buttons.
aria-haspopupboolean | "dialog" | "grid" | "listbox" | "menu" | "tree"Indicates that activating the button opens a popup such as a menu, dialog, listbox, tree, or grid.
aria-labelstringAccessible label for screen readers. Required for icon-only buttons.
aria-labelledbystringReferences the element(s) that label this button. Useful when the visible label lives outside the button.
aria-live"off" | "polite" | "assertive"Optional live-region politeness for loading or dynamic content updates.
aria-pressedboolean | "mixed"Indicates the pressed state for toggle buttons.
asReact.ElementType<any, keyof React.JSX.IntrinsicElements>Optional element or component override. Example: "a", "button", Link
childrenReactNodeChild content to display inside the button.
classNamestringAdditional class name(s) for custom styling.
data-testidstringOptional test ID for testing frameworks.
disabledbooleanWhether the button should be disabled.
fullWidthbooleanWhether the button should take up the full width of its container.
hrefstringIf provided, button will render as a link pointing to this href.
iconComponentType<{ className?: string; "aria-hidden"?: boolean; focusable?: boolean; }>Optional icon component to render inside the button.
isExternalbooleanIf true, opens the link in a new tab (used with `href`).
loadingbooleanWhether to show a loading indicator instead of the children.
loadingLabelstringOptional accessible text announced while loading. Defaults to "Loading" in the component if not provided.
onClick((e: React.MouseEvent<HTMLElement>) => void)Click event handler for the button.
outlinebooleanWhether to use outline styling.
roundingRoundingTypeRounding style for the button ('none' | 'small' | 'medium' | 'large' | 'full').
shadowShadowTypeShadow style for the button ('none' | 'light' | 'medium' | 'strong' | 'intense').
sizeSizeTypeSize of the button ('xs' | 'small' | 'medium' | 'large' | 'xl').
stateStateTypeState of the button ('success' | 'error' | 'warning' | 'disabled' | '').
themeThemeTypeTheme style of the button ('primary' | 'secondary' | 'tertiary' | 'quaternary' | 'clear').
type"button" | "reset" | "submit"Button type for native `<button>` elements ('button' | 'reset' | 'submit').