Meter
Segmentowy wskaźnik zgrubnych, porządkowych wielkości, takich jak dokładność czy szybkość.
Dostępny w
Angular: dostępny Vue: dostępny React: dostępny React Native: dostępny
Użycie
<div class="demo-stack" style="max-width: 22rem; gap: var(--space-2)">
<sone-meter label="Accuracy" [value]="4" [max]="4" detail="Best available" />
<sone-meter label="Speed" [value]="2" [max]="4" />
<sone-meter label="Battery use" [value]="1" [max]="4" detail="Light" />
<sone-meter label="Storage" [value]="3" [max]="5" detail="About 2 GB" />
</div>Import
import {
SoneMeterComponent,
} from "@surface-one/angular/meter";Dokumentacja API
SoneMeterComponentKomponent
Not `<sone-progress>`: a relative rating with no unit announces a sentence ("Accuracy: 4 of 4") instead of `aria-valuenow`, which would invite being read as a percentage.
| Nazwa | Typ | Domyślnie |
|---|---|---|
label | string | "" |
value | number | 0 |
max | number | 4 |
detail | string | null | null |