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

Loader

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import Loader from @prepared911/ui/loader. Renders a span with role="status". Takes the props below and data-* attributes; nothing else reaches the DOM.
PropTypeDefaultNotes
labelLocalizedMessage | DisplayValueVisible text beside the spinner
aria-labelLocalizedMessageRequired when there is no label; optional with one
classNamestringAppended after the generated classes
idstring
refRef<HTMLSpanElement>
LoaderProps is a union: either label is set, or aria-label is required. Reserved design-system state names in data-* are dropped with a warning.
Exports
Loader and the type LoaderProps.
Props
NameTypeDefaultDescription
aria-labelLocalizedMessage—Optional accessible name for the status region when the visible text is not enough. Accessible name of the pending state.
classNamestring—Classes appended after the generated classes.
idstring—Id of the root element.
labelLocalizedMessage | DisplayValue—Visible text beside the spinner, such as "Thinking…". No visible text.
refRef<HTMLSpanElement>—Ref to the root element.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Loader / Usage
Next
Loader / Accessibility
On this page
Exports
Props
Storybook