Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 11 Data

Meter

A level inside a known range: storage used, a plan's limit, a score. It is not work in progress, that is Progress. The value is written next to the label, so the tone colour only repeats what the words say.

Use it in Angular
import { MeterComponent } from '@okaapi-ui/angular';

Levels

You choose the tone from the value: the meter does not guess what is good or bad.

Storage
Orders this month
Delivery score
SMS credit
Angular
<ui-meter label="Storage" [value]="7.2" [max]="10" valueText="7.2 of 10 GB" tone="warning" />
<ui-meter label="Orders this month" [value]="182" [max]="500" valueText="182 of 500" />
<ui-meter label="Delivery score" [value]="94" tone="success" />
<ui-meter label="SMS credit" [value]="3" valueText="3 left" tone="danger" />

In Arabic

المساحة
Angular
<ui-meter label="المساحة" [value]="72" valueText="٧٫٢ من ١٠ جيجابايت" tone="warning" />

When to use something else

If you needUse
Work that is still going, such as an uploadProgress
One number and how it changedStat
A value the reader setsSlider

Inputs

NameTypeDefaultWhat it does
labelstring — Required. What is measured.
valuenumber — Required. The level now, between min and max.
minnumber0The lowest level.
maxnumber100The highest level.
valueTextstring — The value in words, shown and read: "7.2 of 10 GB". Defaults to a percentage.
tone'neutral' | 'success' | 'warning' | 'danger''neutral'Colour of the fill. You decide it from the value.

Keyboard and screen readers

  • The native meter, named by its label, with the value in words beside it.