Skip to content

Button

A wrapper around React Aria’s Button component. Handles keyboard, mouse, and touch activation with full accessibility support.

Terminal window
npx @a2ra/cli add button
{
"type": "Button",
"props": {
"variant": "primary",
"size": "md"
},
"children": "Save changes"
}
PropTypeDescription
variantprimary
secondary default
danger
ghost
Visual style
sizesm
md default
lg
Button size
isDisabledtrue
false default
Prevents interaction and applies disabled styles
isPendingtrue
false default
Shows a loading indicator; disables the button
typebutton default
reset
submit
HTML button type
namestringForm field name
valuestringForm field value
childrenstring
node[]
Button label text or child nodes
  • Use type: "submit" inside a Form node to trigger form submission.
  • isPending disables the button and shows a spinner; use it while an async action is running.
  • variant: "ghost" renders no background or border; suitable for icon buttons inside toolbars.