Action

Button

Definition

Renders a labeled command, submit trigger, or action trigger.

Usage

Use Button for commands. Use Link for navigation.

Attributes

  • label or i18n required. Accessible button text.
  • variant. primary, secondary, ghost, or destructive.
  • size. sm, md, or lg.
  • type. button, submit, or reset.
  • isDisabled. Disables the button.
  • isLoading. Shows a loading state.

Children

Optional child content can override visible content while the label remains the accessible name.

Example

xml
<Action action="/api/orders" invalidate="orders">
<Button label="Save" variant="primary" />
</Action>