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

Confirmation

Usage

Confirmation is the call to action an AI surface offers at a conversational juncture. It shows one or more choices. When one is activated the choices are replaced, in the same space, by an acknowledgement: a check and a short text such as "Built".
When to use
  • A single follow-up the assistant proposes ("Plan", "Build it") that resolves once.
  • A few alternatives at one juncture ("Send for review", "Keep as draft") where choosing one settles the question.
When not to use
  • A value the person picks, then submits: use a Field with RadioGroup or SegmentedControl in a Form, and a Button to submit. Choosing a value is not an action, so ADR 0021 sends it to the form controls.
  • A confirmation that blocks the page or asks "are you sure": use ConfirmDialog.
  • An action that runs for a while and can fail: use ActionButton or a Button with loading, and show the result with Alert.
  • Actions that stay available after use: use Button or ButtonGroup.
Choices
Each choice is a ConfirmationButton, which renders Button.
LookProps
Primaryintent={ButtonIntent.Accent} and variant={ButtonVariant.Solid}
Neutral (default)none
Quietvariant={ButtonVariant.Ghost}
Add icon for a decorative glyph before the label. A choice's onConfirm is its side effect. It runs once, after the group has acknowledged, however many times the choice is activated.
The acknowledgement
acknowledgementLabel is the text a choice falls back to, and what a group that starts acknowledged shows. A choice's acknowledgeLabel replaces it for that choice, so one juncture can resolve to "Sent for review" or "Kept as draft". acknowledgementIcon replaces the check. The acknowledgement takes the choices' place and their height, so the swap moves nothing. It fades in and rises a few pixels; under reduced motion only the fade remains.
Controlled and uncontrolled
Without acknowledged the group acknowledges itself on the first activated choice. With it, the parent decides: set it to true from onAcknowledge to show the acknowledgement, and back to false to offer the choices again. While acknowledged is held at false, the first activation locks the choices until acknowledged changes. To retry after a failure, set it to true and then back to false.
Wrapping
Choices wrap onto further lines in a narrow container.
Previous
Confirm Morph / Accessibility
Next
Confirmation / API and Development
On this page
When to use
When not to use
Choices
The acknowledgement
Controlled and uncontrolled
Wrapping