Progress
A progress bar or spinner for long-running work, with or without a known percentage.
<arc-progress>Overview
Progress shows that work is running and, when you know it, how far along it is.
The bar variant fills a horizontal track from left to right. Use it when you know the percentage, as with a file transfer or quota usage. The spinner variant is a circle sized for buttons, table cells and inline loading states, where a full-width bar doesn't fit.
Both variants have an indeterminate mode for work of unknown length: a 30% segment slides across the bar, or the spinner loops. Switch to determinate as soon as you know the total, for example once the server sends a Content-Length header during an upload.
Guidelines
Do
- Give every indicator a `label` that says what's loading, like "Uploading report.pdf". The fallback names don't
- Use `sm` in table cells and inline spots, and `lg` for full-page loaders
Don't
- Don't leave a determinate bar at 0%. Use indeterminate until real progress data arrives
- Don't use a spinner when you have a percentage. Show the bar
- Don't move a bar backwards. If the total changes, go back to indeterminate
- Don't stack several progress bars on one screen. Combine them into one, or use a Stepper
- Don't show a loader for actions that finish almost at once
Features
- `value` is a percentage, clamped to 0-100, and the bar's fill animates when it changes
- Three sizes (`sm`, `md`, `lg`) set the bar's thickness or the spinner's diameter
- `progressbar` role with `aria-valuenow`, `aria-valuemin` and `aria-valuemax`. `label` is shown above the indicator and used as its `aria-label`
- Without a `label`, the accessible name falls back to "Progress" for the bar and "Loading" for the spinner
- Under `prefers-reduced-motion`, the indeterminate and spinner animations stop
Preview
Usage
<script type="module" src="@arclux/arc-ui"></script>
<div style="display: flex; flex-direction: column; width: 100%; gap: var(--space-lg);">
<arc-progress value="65" label="Uploading project files..."></arc-progress>
<arc-progress variant="spinner" indeterminate label="Processing upload"></arc-progress>
</div>import { Progress } from '@arclux/arc-ui-react';
export function FileUploadStatus() {
return (
<div style={{ display: 'flex', flexDirection: 'column', width: '100%', gap: 'var(--space-lg)' }}>
<Progress value={65} label="Uploading project files..." />
<Progress variant="spinner" indeterminate label="Processing upload" />
</div>
);
}<script setup>
import { Progress } from '@arclux/arc-ui-vue';
</script>
<template>
<div style="display: flex; flex-direction: column; width: 100%; gap: var(--space-lg);">
<Progress :value="65" label="Uploading project files..." />
<Progress variant="spinner" indeterminate label="Processing upload" />
</div>
</template><script>
import { Progress } from '@arclux/arc-ui-svelte';
</script>
<div style="display: flex; flex-direction: column; width: 100%; gap: var(--space-lg);">
<Progress value={65} label="Uploading project files..." />
<Progress variant="spinner" indeterminate label="Processing upload" />
</div>import { Component } from '@angular/core';
import { Progress } from '@arclux/arc-ui-angular';
@Component({
imports: [Progress],
template: `
<div style="display: flex; flex-direction: column; width: 100%; gap: var(--space-lg);">
<arc-progress [value]="65" label="Uploading project files..." />
<arc-progress variant="spinner" indeterminate label="Processing upload" />
</div>
`,
})
export class FileUploadStatusComponent {}import { Progress } from '@arclux/arc-ui-solid';
export function FileUploadStatus() {
return (
<div style={{ display: 'flex', 'flex-direction': 'column', width: '100%', gap: 'var(--space-lg)' }}>
<Progress value={65} label="Uploading project files..." />
<Progress variant="spinner" indeterminate label="Processing upload" />
</div>
);
}import { Progress } from '@arclux/arc-ui-preact';
export function FileUploadStatus() {
return (
<div style={{ display: 'flex', flexDirection: 'column', width: '100%', gap: 'var(--space-lg)' }}>
<Progress value={65} label="Uploading project files..." />
<Progress variant="spinner" indeterminate label="Processing upload" />
</div>
);
}<!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-progress — requires progress.css + base.css (or arc-ui.css) -->
<div class="arc-progress">
<div>
Label
<div
class="progress__spinner"
role="progressbar"
aria-valuenow="Indeterminate"
aria-valuemin="0"
aria-valuemax="100"
aria-label="Label"
>
<svg viewBox="0 0 44 44">
<circle class="progress__spinner-track" cx="22" cy="22" r="20"></circle>
<circle class="progress__spinner-fill" cx="22" cy="22" r="20"></circle>
</svg>
</div>
</div>
</div><!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-progress — self-contained, no external CSS needed -->
<style>
@media (prefers-reduced-motion: reduce) {
.arc-progress .progress__fill,
.arc-progress .progress__spinner svg,
.arc-progress .progress__spinner-fill { animation: none; }
}
</style>
<div class="arc-progress" style="display: block">
<div>
Label
<div
class="progress__spinner" style="display: inline-block"
role="progressbar"
aria-valuenow="Indeterminate"
aria-valuemin="0"
aria-valuemax="100"
aria-label="Label"
>
<svg viewBox="0 0 44 44">
<circle style="fill: none; stroke: rgb(24, 24, 30); stroke-width: 3" cx="22" cy="22" r="20"></circle>
<circle class="progress__spinner-fill" style="fill: none; stroke: rgb(77, 126, 247); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 80, 200; stroke-dashoffset: 0; animation: spinner-dash 1.4s ease-in-out infinite" cx="22" cy="22" r="20"></circle>
</svg>
</div>
</div>
</div>API
labelstring''- Accessible label text applied as aria-label on the underlying progressbar role element. This is the only way screen readers can convey the purpose of the indicator. Always provide a meaningful label such as "Uploading report.pdf" rather than a generic "Loading".
valuenumber0- Current completion percentage from 0 to 100. Only meaningful in determinate mode. The bar fills proportionally and aria-valuenow updates to match, giving screen readers a live reading.
variant'bar' | 'spinner''bar'- Selects the visual shape. Bar renders a horizontal track with a fill that grows from left to right, best for wide containers and known percentages. Spinner renders a circular indicator suited to compact inline or button contexts.
size'sm' | 'md' | 'lg''md'- Controls the thickness of the bar track or the diameter of the spinner. Small (sm) fits inside table cells and tight layouts. Medium (md) is the standard default. Large (lg) is appropriate for page-level or hero loading states.
indeterminatebooleanfalse- When true, the bar pulses or the spinner loops without a fixed endpoint. Use this when the total work is unknown. Switch to determinate (indeterminate=false) and set a value as soon as real progress data becomes available.
showValuebooleanfalse- Displays the current percentage value next to the label.