Design System v1.0

Button

Trigger actions with a range of variants, sizes, and icon layouts.

Variants

The full set of visual styles: neutral variants, then each semantic in a solid fill and a subtle tint.

Sizes

Small, default, and large heights, plus the disabled state.

With icons

Leading or trailing icons paired with a text label.

Icon buttons

Square icon-only buttons across sizes, with accessible labels.

Loading

A spinner and disabled state while an action is in flight.

Ghost with animated icon

A subtle ghost button whose icon animates on hover.

Async / promise state

Tracks a promise through loading, success, and error states.

Copy to clipboard

Copies text and swaps to a checkmark to confirm.

API reference

A clickable button with class-variance-authority variants and sizes, including icon-only sizes.

Full props on Base UI Button
Anatomy
ButtonClickable button with a configurable visual variant and size.
Props
PartPropTypeDefaultDescription
Buttonvariant"default" | "outline" | "secondary" | "ghost" | "destructive" | "success" | "warning" | "info" | "destructive-subtle" | "success-subtle" | "warning-subtle" | "info-subtle" | "link""default"Style: neutral, semantic solid/subtle, or link.
Buttonsize"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg""default"Dimensions: default, xs, sm, lg, and icon variants.

Command Palette

Search for a command to run...