Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Action Button
  3. Usage

Action Button

Usage

Use ActionButton for a button that starts one async action and should show where it is: save, send, dispatch, sync. For a plain action, use Button.
  • Click calls onAction. Return the promise; the button stays pending until it settles.
  • A resolved action shows the success label and a drawn check for about 2.4 seconds, then returns to idle.
  • A rejected action returns to idle at once and calls onActionError. The button has no error face, so report the failure there.
  • Paint comes from intent, variant, and size, the same props as Button. leading adds an icon before the label. The trailing icon belongs to the button.
  • tooltip works as on Button.
When not to use it
  • The action is instant: use Button.
  • The action needs confirmation first: use ConfirmMorph.
  • The control copies a value: use CopyButton.
Previous
Accordion / Accessibility
Next
Action Button / API and Development
On this page
When not to use it