Button
ActionsTriggers an action or event. Supports variants, sizes, icons and a built-in loading state.
Live preview
Installation
Import the component from the kit. The package ships source and is transpiled by Next.js.
Usage
Compose the component with your own content. All controls share the same focus, disabled and invalid states.
Examples
Sizes and shapes
Use size to match density and shape to soften an action.
Sizes and shapes
API Reference
Props are additive to the underlying Base UI or native element.
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "outline" | "ghost" | "soft" | "danger" | "primary" | Visual emphasis of the button. |
| size | "sm" | "default" | "lg" | "icon" | "icon-sm" | "default" | Control height and padding. |
| shape | "rounded" | "pill" | "rounded" | Corner treatment. |
| loading | boolean | — | Shows a spinner and disables interaction. |
| startIcon | IconComponent | — | Icon rendered before the label. |
| endIcon | IconComponent | — | Icon rendered after the label. |
| disabled | boolean | — | Disables the button. |