autoFocus | boolean | - | Whether the element should receive focus on render. |
children | ReactNode | - | The children of the component. A function may be provided to alter the children based on
component state. |
className | ClassNameOrFunction<ButtonRenderProps> | 'react-aria-Button' | The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the
element. A function may be provided to compute the class based on component state. |
color | "dark" | "light" | "dark-static" | "light-static" | "success" | "danger" | "primary" | "secondary" | "accent" | "primary" | The color of the button. |
dir | string | - | |
excludeFromTabOrder | boolean | - | Whether to exclude the element from the sequential tab order. If true,
the element will not be focusable via the keyboard by tabbing. This should
be avoided except in rare scenarios where an alternative means of accessing
the element or its functionality via the keyboard is available. |
form | string | - | The `<form>` element to associate the button with.
The value of this attribute must be the id of a `<form>` in the same document.
See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form). |
formAction | string | ((formData: FormData) => void | Promise<void>) | - | The URL that processes the information submitted by the button.
Overrides the action attribute of the button's form owner. |
formEncType | string | - | Indicates how to encode the form data that is submitted. |
formMethod | string | - | Indicates the HTTP method used to submit the form. |
formNoValidate | boolean | - | Indicates that the form is not to be validated when it is submitted. |
formTarget | string | - | Overrides the target attribute of the button's form owner. |
hidden | boolean | - | |
id | string | - | The element's unique identifier. See
[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id). |
inert | boolean | - | |
isDisabled | boolean | - | Whether the button is disabled. |
isFailed | boolean | - | Whether the button is in a failed state. |
isPending | boolean | - | Whether the button is in a pending state. |
isReadOnly | boolean | - | Whether the button is in a read only state. |
isSucceeded | boolean | - | Whether the button is in a succeeded state. |
lang | string | - | |
name | string | - | Submitted as a pair with the button's value as part of the form data. |
preventFocusOnPress | boolean | - | Whether to prevent focus from moving to the button when pressing it.
Caution, this can make the button inaccessible and should only be used when alternative
keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's
increment/decrement control. |
render | DOMRenderFunction<"div", TooltipRenderProps> | - | Overrides the default DOM element with a custom render function.
This allows rendering existing components with built-in styles and behaviors
such as router links, animation libraries, and pre-styled components.
Requirements:
- You must render the expected element type (e.g. if `<button>` is expected, you cannot render an
`<a>`).
- Only a single root DOM element can be rendered (no fragments).
- You must pass through props and ref to the underlying DOM element, merging with your own prop
as appropriate. |
showFeedback | boolean | - | Whether success feedback is shown after the action succeeded. Asynchronous
actions show feedback by default; set `false` to suppress it. |
size | "s" | "m" | "m" | The size of the button. |
slot | string | - | Slot for button placement in action groups. |
style | StyleOrFunction<TooltipRenderProps> | - | The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the
element. A function may be provided to compute the style based on component state. |
translate | "yes" | "no" | - | |
type | "button" | "submit" | "reset" | 'button' | The behavior of the button when used in an HTML form. |
value | string | - | The value associated with the button's name when it's submitted with the form data. |
variant | "solid" | "plain" | "soft" | "outline" | "solid" | The visual variant of the button. |
wrapWith | ReactElement<unknown, string | JSXElementConstructor<any>> | - | A React element the component is wrapped with. The element is cloned and
receives the component as its only child — useful to render the component
inside a link, a tooltip trigger or any other wrapper without changing the
surrounding markup. |