API and Development
Loader from @prepared911/ui/loader.
Renders a span with role="status". Takes the props below and data-* attributes; nothing else reaches the DOM.
| Prop | Type | Default | Notes |
|---|---|---|---|
label | LocalizedMessage | DisplayValue | Visible text beside the spinner | |
aria-label | LocalizedMessage | Required when there is no label; optional with one | |
className | string | Appended after the generated classes | |
id | string | ||
ref | Ref<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.
Loader and the type LoaderProps.
| Name | Type | Default | Description |
|---|---|---|---|
aria-label | LocalizedMessage | — | Optional accessible name for the status region when the visible text is not enough. Accessible name of the pending state. |
className | string | — | Classes appended after the generated classes. |
id | string | — | Id of the root element. |
label | LocalizedMessage | DisplayValue | — | Visible text beside the spinner, such as "Thinking…". No visible text. |
ref | Ref<HTMLSpanElement> | — | Ref to the root element. |