Base
Pure CSS
Spinner
Short waits; inside buttons, beside row text and standalone — with size and tone dials.
Real scenarios
The component as it is used in a product — not a specimen grid.
Buttons that wait, honestly
Nothing to wire up: a wire:click on the button is enough — the label becomes a spinner at the exact same width, then the toast lands.
A row that swaps, not shoves
While the report runs, the row keeps its height and puts a text-sized spinner where the words were — layout never jumps.
Last month — 48,260 orders
Sizes
sm rides the baseline of a sentence, md stands alone, lg owns a blank slate page.
In a sentence
Screen readers hear the label, not the circle; the eye gets both.
Opening the studio…
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| size | string | md | sm (text-sized) · md · lg. |
| label | string | در حال بارگذاری | The localized default aria label. |
Snippet
<x-nx::button variant="primary" wire:click="save">
<x-nx::spinner size="sm" wire:loading /> ذخیره
</x-nx::button>