On this page
@addTagHelper *, Webority.Ui.RazorSizes
Use sm inline with text or inside a control, and md alone in a small area; give each spinner a label.
Busy buttons
A button's loading prop draws its own spinner and disables the button, so never put a spinner inside it.
Spinner or skeleton
Prefer a skeleton for content with a known shape, since it shows what is coming; a spinner suits a small wait.
Every option
Every value of every prop, one cell each.
size: presets and exact pixel diameters
(default) size="md"size="sm"size="16"size="24"size="32"size="48"size="64"label
(default) label="Loading"label="Checking availability"class passthrough
class="text-primary"class="text-danger" size="sm"Guidance
What to do, and what to avoid.
Use it when
- A short, shapeless wait, such as a validity check or an inline recalculation.
- The busy area is too small for a skeleton to read as anything.
- You need a busy indicator next to a status line or in a table cell.
Reach for something else when
- Content with a known shape is loading. → AppSkeleton / AppSkeletonRows
- A button is submitting. → AppButton's loading prop
- The whole app is booting. → AppSplash
- The wait finished and there is nothing to show. → AppEmptyState
Name what is loading
A label that says what is happening, sized to sit inline with the thing it belongs to.
A lone spinner filling a content area: no indication of what is loading, no idea how long, and the layout will jump when the real content arrives.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
3 props. The 2 most used come first.
Used on most screens 2 props
| Prop | Type | Default | Description |
|---|---|---|---|
| sizedefault md | Sm | Md | md | A preset (sm or md); the border scales with it. |
| labeldefault Loading | string | Loading | Accessible name. |
Less common 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| size-pxdefault - | number | - | The size in pixels, instead of a preset. |
Screen reader
1 notes- The spinner is a span with role status, named by label, which is Loading unless you set it.
Do and avoid
1 pairsName what is loading
A label that says what is happening, sized to sit inline with the thing it belongs to.
A lone spinner filling a content area: no indication of what is loading, no idea how long, and the layout will jump when the real content arrives.