Button
Trigger an action. Built on the native <button>; fully keyboard + screen-reader accessible.
Uses native <button>; supports disabled, aria-busy during loading; focus ring honors tokens.
Variants
Section titled “Variants”Button ships five visual variants — solid, soft, outline, ghost, and link — each available in five color schemes: accent, neutral, success, danger, and warning.
Five sizes are available: xs, sm, md (default), lg, and xl.
With icons
Section titled “With icons”Use leftIcon or rightIcon to attach a decorative icon without breaking the accessible label.
Loading state
Section titled “Loading state”Pass loading to show a spinner and set aria-busy="true". The button is automatically disabled while loading so double-submits are prevented.
Disabled state
Section titled “Disabled state” PropTypeDefaultDescription
variant
"solid"|"soft"|"outline"|"ghost"|"link"
"solid"
Visual style. `solid` for primary actions; `soft`/`outline`/`ghost` for
less prominent ones; `link` to render as inline text.
colorScheme
"accent"|"neutral"|"success"|"danger"|"warning"
"accent"
Colour palette. `accent` is the brand colour; semantic schemes carry
meaning (`danger` for destructive actions, `success` for confirmations).
size
"xs"|"sm"|"md"|"lg"|"xl"
"md"
Control size — affects height, padding, font size, and icon size.
Available: `xs`, `sm`, `md`, `lg`, `xl`.
shape
"default"|"square"|"pill"
"default"
Geometry preset. `square` removes horizontal padding for icon-only
buttons; `pill` rounds the corners to a fully-rounded radius.
fullWidth
boolean
—
Stretches the button to fill its container's inline size.
loading
boolean
false
Renders a spinner inside the button and blocks interaction. The
`disabled` and `aria-busy` attributes are set automatically.
leftIcon
ReactNode
—
Icon rendered before the label.
rightIcon
ReactNode
—
Icon rendered after the label.
asChild
boolean
—
When `true`, merges props onto the immediate child (Radix `Slot` pattern)
instead of rendering a `<button>`. Useful for rendering `<Link>`s that
look like buttons.
className
string
—
style
CSSProperties
—
Accessibility
Section titled “Accessibility”- Rendered as a native
<button>— inherits all ARIA semantics for free. loadingsetsaria-busy="true"; the visible label stays announced.- Focus outline uses the token-driven focus ring; never removed.
disabledis forwarded directly to the host element;loadingalso disables the button at the DOM level.
Recipes
Section titled “Recipes”- Pair with
<Tooltip>when the label is icon-only. - Use
variant="ghost"inside toolbars to reduce visual weight. - Use
asChildto render a link styled as a button:<Button asChild><a href="/next">Next</a></Button>. - Use
shape="pill"for rounded pill-style buttons, orshape="square"for icon-only square buttons.