ProgressBar

Linear progress indicator with label, percentage display, colour variants, stripes, animation, and segmented display.

Basic Progress

Upload progress65%

Custom Value/Max

Tasks: 3 of 560%

Colour Variants

Primary80%
Success100%
Warning55%
Danger30%

Striped

Striped pattern70%

Animated

Animated stripes50%

Segmented Progress

Display multiple segments in a single progress bar, each with its own color.

Project Status0%
Storage: 800 GB / 1 TB

JavaScript API

Read and update progress values dynamically with JavaScript.

Controlled progress40%
Use the buttons above to control the progress bar...
PHP

PHP PHP Methods (Fluent)

Method / PropertyParametersDescription
$m->progressBar($id)stringCreate a ProgressBar component.
->value($v)floatCurrent progress value (min: 0).
->max($m)floatMaximum value (default: 100, min: 1).
->label($text)stringText label shown above the bar.
->showPercent($show)boolShow percentage next to the label (default: false).
->variant($v)stringColour: primary, success, warning, danger, purple.
->primary()Shorthand for ->variant('primary').
->success()Shorthand for ->variant('success').
->warning()Shorthand for ->variant('warning').
->danger()Shorthand for ->variant('danger').
->striped($s)boolAdd diagonal stripe pattern.
->animated($a)boolAnimate stripes (requires ->striped()).
->segments($segs)arrayArray of segments: [['value' => 30, 'variant' => 'success', 'label' => 'Done'], ...]

JS JS Methods

Method / PropertyParametersDescription
m.progressBar(id)stringGet ProgressBar instance.
getValue()Returns current value as float.
getMax()Returns max value as float.
getPercent()Returns percentage (0-100).
setValue(val, animate)number, ?boolSet value. animate defaults to true.
setMax(max)numberSet max value and recalculate percentage.
increment(amount)?numberAdd to value (default: 1).
decrement(amount)?numberSubtract from value (default: 1).
complete()Set to max (100%).
reset()Set to 0.

EVENT Events

Event NameDetailDescription
m:progressbar:change{oldValue, newValue, percent, max}Fired when value changes.
m:progressbar:complete{value}Fired when complete() is called.
m:progressbar:reset{}Fired when reset() is called.