Loader
Spinning glyph for in-flight generation.
Import
tsx
import { Loader } from "@cronus-ui/ui";
bash
npx cronus-ui add loader
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component LoaderDefault layout:inline style:loader {
label "default"
}
page "/audit/loader/default" type:custom {
use LoaderDefault
}
large.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component LoaderLarge layout:inline style:loader {
size:32
aria-label:"Saving"
label "Saving"
}
page "/audit/loader/large" type:custom {
use LoaderLarge
}
API Reference
Generated from the component's exported types.
LoaderLabels
| Prop | Type | Default | Description |
|---|---|---|---|
loading* | string | — | — |
LoaderProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | Ref forwarded to the underlying DOM node. |
size | number | 16 | Pixel size of the spinner glyph. |
labels | Partial<LoaderLabels> | — | Override default English strings. |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |