Buttons allow users to perform actions with mouse, touch, and keyboard interactions.
color
variant
size
isDisabled
isLoading
1<t>
2 Hello
3</t>1<Button></Button>npm install @rootui/button1import { Button } from "@rootui/button";
2
3export default function Page() {
4 return (
5 <Button>Click me</Button>
6 )
7}See the React Aria documentation for more information.
Prop | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
Whether the button is in a pending state. This disables press and hover events while retaining focusability, and announces the pending state to screen readers. | ||
| | |
Same as 'isPending'. This is just an alternative name for better developer experience. | ||
| | |
Whether the button is disabled. | ||
| | |
Override the default loading icon with a custom one. | ||
| | |
Additional props to be spread into the default loading spinner (SVG), such as className, style, or aria-label. | ||
Attribute | Description |
|---|---|
| Whether the button is currently hovered with a mouse. |
| Whether the button is currently in a pressed state. |
| Whether the button is focused, either via a mouse or keyboard. |
| Whether the button is keyboard focused. |
| Whether the button is disabled. |
| Whether the button is currently in a pending state. |