OOUI/Widgets/Progress bars/Example 1
Appearance
JS
[edit]// Example: A determinate progress bar. Set an initial percent with
// the 'progress' configuration option.
var progressBar = new OO.ui.ProgressBarWidget( {
progress: 33
} );
$( document.body ).append( progressBar.$element );
PHP
[edit]use OOUI\ProgressBarWidget;
// Example: A determinate progress bar. Set an initial percent with
// the 'progress' configuration option.
$progressBar = new ProgressBarWidget( [
'progress' => 33
] );
// Append to HTML DOM
$dom = new DOMDocument();
$body = $dom->createElement( 'body', $progressBar );
$dom->appendChild( $body );
echo $dom->saveHTML();