Skip to content

Progress

Viames Marino edited this page Feb 26, 2026 · 2 revisions

Pair framework: Progress

Pair\Html\FormControls\Progress renders an HTML <progress> element.

Methods

  • max(int|float $maxValue): self
  • render(): string
  • Inherited methods: value() and caption() from FormControl

Example

$upload = (new \Pair\Html\FormControls\Progress('uploadProgress'))
    ->value(45)
    ->max(100)
    ->caption('45%');

echo $upload->render();

Streaming status bar:

$sync = (new \Pair\Html\FormControls\Progress('sync'))
    ->value(12)
    ->max(24)
    ->caption('12/24 chunks');

See also: Meter, Number, FormControl.

Clone this wiki locally