Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Reasoning
  3. API and Development

Reasoning

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import Reasoning from @prepared911/ui/reasoning.
Reasoning
PropTypeDefaultNotes
labelLocalizedMessagerequiredTrigger label when complete, for example "Thought for 12s".
streamingLabelLocalizedMessageTrigger label while streaming, for example "Thinking…". Falls back to label.
isStreamingbooleanfalseShows the streaming label in a Shimmer with a sparkle; starts open.
openbooleanControlled open state.
defaultOpenbooleanisStreamingInitial open state when uncontrolled; read on the first render only.
onOpenChange(open: boolean, details: ChangeDetails) => voidReason is trigger-press.
classNamestringAppended to the root.
childrenReactNodeThe reasoning, in the disclosed region.
Props
NameTypeDefaultDescription
labelLocalizedMessage—Trigger label when the reasoning is complete, for example "Thought for 12s". The caller formats any elapsed time, because the design system ships no translation runtime ([ADR 0009](../../../docs/decisions/0009-copy-prop-types.md)).
childrenReactNode—The assistant's reasoning, shown in the disclosed region. Block content is allowed.
classNamestring—Classes appended to the root.
defaultOpenboolean—Initial open state when uncontrolled. Defaults to {@link ReasoningProps.isStreaming} on the first render.
isStreamingbooleanfalseThe reasoning is still arriving. The trigger shows the streaming label in a Shimmer with a leading sparkle, and the region starts open unless defaultOpen says otherwise.
onOpenChangeCollapsibleOpenChangeHandler—Fires when the trigger requests a change. details.cancel() keeps the current state.
openboolean—Controlled open state.
streamingLabelLocalizedMessage—Trigger label while {@link ReasoningProps.isStreaming} is true, for example "Thinking…". Falls back to label.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Reasoning / Usage
Next
Reasoning / Accessibility
On this page
Reasoning
Props
Storybook