IconButton
Square, icon-only button built on Button; takes an icon node and a required label that's applied as aria-label and enforces type="button" by default.
Requires a string label which is applied as aria-label; the icon child should be aria-hidden so screen readers only announce the label.
Variants
Section titled “Variants”solid, soft, outline, ghost, and link mirror the Button variants. bare opts out of the Button recipe entirely and renders a plain <button> — useful for close buttons on dialogs that own their own styling.
xs, sm, md (default), lg, and xl.
Color schemes
Section titled “Color schemes”Pair variant with colorScheme (accent, neutral, success, warning, danger).
shape defaults to square for IconButton — set shape="pill" for a circular icon button.
Disabled
Section titled “Disabled” PropTypeDefaultDescription
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.
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
—
variant
"link"|"solid"|"soft"|"outline"|"ghost"|"bare"
—
icon*
ReactNode
—
The icon element — typically a Cynosure icon or an inline SVG.
label*
string
—
Accessible label — announced in place of textual content. Required.
Accessibility
Section titled “Accessibility”labelis required and forwarded asaria-label— there is no visible text content, so the label is the control’s accessible name.- The component enforces
type="button"by default to prevent accidental form submission. - Mark the inner SVG
aria-hidden="true"so screen readers don’t announce a duplicate of the label. shapedefaults tosquare; the underlying Button still keeps a comfortable hit target at every size.- Pair with a
Tooltipto surface the label on hover for sighted users while keeping it announced to assistive tech.
Recipes
Section titled “Recipes”- Use
variant="bare"for close / clear buttons inside dialogs and inputs where a parent recipe owns the styling. - Match the SVG stroke to
currentColorso the icon picks up the button’s contextual colour. - Drop
IconButtons into aButtonGroupfor compact toolbars — variant and size flow through the group context.