progress_bar() html()

A progress bar; several values stack in one bar.

html()->progress_bar($data = [], $extra = [])

Options

OptionMeaning
$dataPercents: 35 or ['val' => 20, 'type' => 'warning', 'label'].
typeColour of the bars without their own: success, info, warning, danger.
striped, animated, height, themeBootstrap 5 options (per bar too with B5_ITEM_OPTIONS).

Example

Code

return html()->progress_bar(['35', ['val' => '20', 'type' => 'warning'], ['val' => '10', 'type' => 'info']], ['type' => 'success'])
    . html()->progress_bar(['60'], ['striped' => 1, 'animated' => 1]);

Bootstrap 3 and 5

Bootstrap 3 progress; Bootstrap 5 progress-stacked for several bars.

See also: html/spinner