LoadingSpinner
An indeterminate indicator for short waits.
import { LoadingSpinner } from '@elluzion/iv-ui'; 01 Preview
Sizes
Small, default, and large diameters.
Source· svelte Show Hide
<script lang="ts">
import { LoadingSpinner } from '@elluzion/iv-ui';
</script>
<div class="row">
<LoadingSpinner size={14} />
<LoadingSpinner />
<LoadingSpinner size={36} />
</div>
<style>
.row {
display: flex;
align-items: center;
gap: var(--iv_spacing-lg);
}
</style>02 Usage
sizeis the diameter in pixels;colordefaults to the accent token.- It announces itself as a status; add text when the wait may be long.
- For determinate work, use
Progressinstead.
03 Examples
Color
Pass any CSS color; the default is the brass accent.
Source· svelte Show Hide
<script lang="ts">
import { LoadingSpinner } from '@elluzion/iv-ui';
</script>
<div class="row">
<LoadingSpinner size={22} color="var(--iv_success)" />
<LoadingSpinner size={22} color="var(--iv_error)" />
<LoadingSpinner size={22} color="var(--iv_foreground-dim)" />
</div>
<style>
.row {
display: flex;
align-items: center;
gap: var(--iv_spacing-lg);
}
</style>Inline
The spinner sits on the text baseline inside a status row.
Syncing the edge configuration…
Source· svelte Show Hide
<script lang="ts">
import { LoadingSpinner } from '@elluzion/iv-ui';
</script>
<p class="status">
<LoadingSpinner size={14} />
Syncing the edge configuration…
</p>
<style>
.status {
display: flex;
align-items: center;
gap: var(--iv_spacing-sm);
margin: 0;
font-family: var(--iv_font-mono);
font-size: var(--iv_text-body);
color: var(--iv_foreground-dim);
}
</style>04 API
import { LoadingSpinner } from '@elluzion/iv-ui';Props
2 props · 0 events · 0 snippets| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | 24 | Diameter in pixels. |
| color | string | 'var(--iv_accent)' | Stroke color; defaults to the current text color. |
05 Accessibility
- The spinner uses
role="status"with the labelLoading. - It is decorative only in the sense of size; screen readers announce the status.
- Rotation stops when
prefers-reduced-motionis set.
06 Tokens & CSS hooks
Tokens used
Class hooks
.iv-spinner