Spinner
Indeterminate loading indicator.
Loading…
Import
Section titled “Import”import { Spinner } from "@pelagornis/page/components";Example
Section titled “Example”The preview above renders this file. Copy it into src/components/ to start from it.
import { Spinner, Stack } from "@pelagornis/page/components";
export default function SpinnerDemo() { return ( <Stack direction="row" gap="sizeXLarge" align="center" wrap> <Spinner size="sm" /> <Spinner size="md" /> <Spinner size="lg" label="Loading…" labelPosition="right" /> </Stack> );}Use in MDX
Section titled “Use in MDX”Spinner can be written straight in an .mdx page. Import it below the frontmatter. It renders on the server, so no client directive is needed.
---title: Example---
import { Spinner } from "@pelagornis/page/components";
<Spinner size="lg" label="Loading…" labelPosition="right" />Use in Markdoc
Section titled “Use in Markdoc”pageMarkdoc() registers a spinner tag for this component. Add the preset once in markdoc.config.mjs (see Use in Markdoc), then write the tag in any .mdoc page.
{% spinner size="lg" label="Loading…" labelPosition="right" /%}Attributes use the same names and values as the React props.
Variants
Section titled “Variants”Values the component accepts for each variant prop.
| Prop | Values |
|---|---|
size | xs sm md lg xl xxl |
Anatomy
Section titled “Anatomy”Parts of the component and the data-refineui role each one renders.
| Part | Role |
|---|---|
root | spinner |
Reference
Section titled “Reference”- RefineUI · Spinner for design guidance and token detail.
- Use in MDX and Use in Markdoc for the general rules.