Feedback
Spinner
A small indeterminate loading indicator, for use inline or inside a button.
LoadingLoadingLoading
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JSpinner } from '@juxtui/ui'Usage #
Copy
<JSpinner />
<JSpinner size="sm" label="Loading results" />Set label to an empty string when the surrounding context already says what’s loading, e.g. text right next to it — otherwise the default "Loading" is announced.
Variants & examples #
Centred in a panel#
A common pattern while a section’s content is being fetched.
Loading chart
Inline with text#
The adjacent text carries the meaning, so label is turned off to avoid announcing it twice.
Fetching results…
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | 'md' | 14, 16 or 20px. |
| label | string | 'Loading' | Announced to screen readers. Set to an empty string when the context already says it. |
Accessibility #
- When
labelis set, the wrapper getsrole="status"and the label is visually hidden but announced. - With an empty
label, the spinner is purely decorative — make sure something nearby still announces the loading state.