Installation
Installs the Base UI flavor. Switch in the right panel.
Variants
Inspect
Sizes
Inspect
With Icons
Inspect
Single-line icon and label
Icon and label stay together in a horizontal, non-wrapping row. Both icon props and inline SVG children are supported, including compact and loading states. When a toolbar gets narrow, wrap or scroll whole controls rather than stacking an icon above its label. Use an explicitly named icon-only action when the product calls for one.
Inspect
Loading & Disabled
Inspect
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "tertiary" | "ghost" | "primary" | Visual style of the button. |
| size | "sm" | "md" | "lg" | "icon-sm" | "icon" | "icon-lg" | "md" | Size of the button. |
| loading | boolean | false | Shows a spinner and disables the button. |
| leadingIcon | IconComponent | — | Icon displayed before the label. |
| trailingIcon | IconComponent | — | Icon displayed after the label. |
| asChild | boolean | false | Merge props onto the child element instead of rendering a <button>. |
| disabled | boolean | false | Disables the button. |