Button
Primary, secondary, ghost and danger buttons with loading and success states.
Install this component
Install command hidden until you are signed in with a license.
Live demo
Props
| Prop | Type | Description |
|---|---|---|
| variant | "primary" | "secondary" | "ghost" | "danger"default "primary" | Visual style. |
| size | "sm" | "md" | "lg"default "md" | Height and padding. |
| loading | boolean | Shows a spinner and blocks clicks. |
| success | boolean | Shows a check mark state. |
| icon | ReactNode | Leading decorative icon. |
Accessibility
Keyboard
- Enter / SpaceActivate
- TabFocus
ARIA and semantics
- Native button element
- aria-busy and aria-disabled while loading (stays focusable)
- Icons are aria-hidden
Source
Copy the files into your project. Or install with the commands above (they unlock with your license).
The full Button source is part of the license.
The live demo is free to try. A license unlocks copy-paste source, installs and exports for every component and pack.
Unlock every icon