Download Progress
A progress bar with a live caption and an optional cancel action.
Available in
Angular: available Vue: available React: available React Native: not available yet
Usage
<div class="demo-stack" style="max-width: 26rem">
@if (cancelled()) {
<div class="demo-row">
<span style="color: var(--text-secondary)">Download cancelled.</span>
<button soneBtn type="button" size="sm" variant="outline" (click)="cancelled.set(false)">Retry</button>
</div>
} @else {
<sone-download-progress
[frac]="0.42"
cancellable
ariaLabel="Example model download"
(cancelRequested)="cancelled.set(true)"
/>
}
<sone-download-progress [frac]="null" label="Preparing…" ariaLabel="Preparing files" />
<sone-download-progress label="Example-3B" separator=" · " [frac]="0.63" ariaLabel="Example-3B download" />
<sone-download-progress size="md" [frac]="0.7" ariaLabel="Setup progress" />
</div>Import
import {
SoneDownloadProgressComponent,
} from "@surface-one/angular/download-progress";API reference
SoneDownloadProgressComponentComponent
| Name | Type | Default |
|---|---|---|
frac | number | null | null |
label | — | $localize`Downloading…` |
separator | string | " " |
ariaLabel | string | null | null |
size | SoneProgressSize | "sm" |
cancellable | boolean | false |
cancelLabel | — | $localize`Cancel download` |
| Name | Type |
|---|---|
cancelRequested | void |