ProgressBar is actually a quite simple element, but it can be made quite interractive along with
After adding a console to your Render Tree, you just need to set a call-back:
// Add progressbar showing 0 (out of 100) $bar = $app->add('ProgressBar'); // Add with some other value of 20% and label $bar2 = $app->add(['ProgressBar', 20, '% Battery']);
$bar->value = 5; // sets this value instead of 0 $app->add(['Button', 'charge up the battery'])->on('click', $bar2->jsValue(100));
Updating Progress in RealTime¶
You can use real-time element such as jsSSE or Console (which relies on jsSSE) to execute jsValue() of your progress bar and adjust the display value.