Progress
Liniowy pasek postępu, określony lub nieokreślony, z dostępną rolą progressbar.
Dostępny w
Angular: dostępny Vue: dostępny React: dostępny React Native: dostępny
Użycie
Downloading model40%
<div class="demo-stack" style="max-width: 24rem">
<div class="demo-stack" style="gap: var(--space-2)">
<div style="display: flex; justify-content: space-between; font-size: var(--font-size-sm)">
<span>Downloading model</span>
<span style="color: var(--text-secondary)">{{ value() }}%</span>
</div>
<sone-progress [value]="value()" ariaLabel="Model download" />
</div>
<div class="demo-row">
<button soneBtn variant="outline" size="sm" type="button" [disabled]="value() === 0" (click)="step(-20)">−20%</button>
<button soneBtn variant="outline" size="sm" type="button" [disabled]="done()" (click)="step(20)">+20%</button>
</div>
<sone-progress size="md" tone="warning" [value]="80" ariaLabel="Storage, nearing the limit" />
<sone-progress size="md" tone="destructive" [value]="97" ariaLabel="Storage, over the limit" />
<!-- No value: indeterminate, busy for an unknown amount of time -->
<sone-progress ariaLabel="Re-indexing notes" />
</div>Import
import {
SoneProgressComponent,
} from "@surface-one/angular/progress";Dokumentacja API
SoneProgressComponentKomponent
| Nazwa | Typ | Domyślnie |
|---|---|---|
value | number | null | null |
max | number | 100 |
ariaLabel | string | null | null |
size | SoneProgressSize | "sm" |
tone | SoneProgressTone | "default" |
valueLabel | SoneProgressLabelFn | defaultProgressLabel |