Button
Trigger an operation, submit a form, or confirm a decision with a native button.
Basic usage
Button defaults to type="button". Use type="submit" to submit a form. Use an <a> link to navigate to a URL.
Variants
variant sets the visual emphasis. Use solid for the main action, outline or soft for alternatives, and ghost for quieter actions. link gives the button a link appearance.
Tones
tone conveys the intent of the action and follows the theme. For example, danger signals a destructive action.
Sizes
Default heights range from 24 px (xs) to 48 px (lg). With responsive, the button uses one smaller size below 640 px. xs keeps its original height. Use rounded for pill corners and fullWidth to fill the available width.
Icons
Use startIcon or endIcon to support a label. Give an icon-only button an accessible name with aria-label.
States
Use disabled for an unavailable action and loading while an operation runs. While loading, the button blocks activation, retains its width and accessible name, and exposes aria-busy. Use aria-pressed for a toggle action such as bookmarking. Hover, use Tab, or hold the button down to see hover, focus, and :active.
API
Button also accepts native HTML button attributes, events, and refs. Keyboard focus and Enter or Space activation follow native behavior.
| Prop | Values and behavior | Default |
|---|---|---|
variant | solid, outline, soft, ghost, link | solid |
tone | primary, neutral, info, success, warning, danger | primary |
size | xs, sm, md, lg | md |
rounded | boolean | false |
fullWidth | boolean | false |
responsive | boolean | false |
iconOnly | boolean | false |
startIcon / endIcon | JSX.Element | — |
loading | boolean | false |
disabled | boolean | false |
type | button, submit, reset | button |
aria-label | string | — |
aria-pressed | true, false, mixed | — |