-
Notifications
You must be signed in to change notification settings - Fork 2
Meter
Viames Marino edited this page Feb 26, 2026
·
2 revisions
Pair\Html\FormControls\Meter renders an HTML <meter> element.
min(int|float $minValue): selfmax(int|float $maxValue): selflow(int|float $lowValue): selfhigh(int|float $highValue): selfoptimum(int|float $optimumValue): selfrender(): string
- Caption text is rendered between opening and closing
<meter>tags. -
value(...)andcaption(...)are inherited from FormControl.
$quality = (new \Pair\Html\FormControls\Meter('quality'))
->value(72)
->min(0)
->max(100)
->low(30)
->high(80)
->optimum(90)
->caption('72%');
echo $quality->render();Current implementation always renders value and max attributes. The internal min, low, high, optimum properties are settable but are not currently emitted as HTML attributes by render().
See also: Progress, Number, FormControl.