← API Index · How to use components

loadingbar component #oo-loadingbar

A thin progress bar — typically fixed to the top of the page — that moves in random steps while the toolkit's network requests are running and fills up to 100% when all are done. Signals come from the network layer, which tracks parallel requests: each request started, progressed or finished advances the bar. It can start again right away.

The component builds its markup itself (no template): div.oo-loadingbar-box > div.oo-loadingbar-bar. Style the bar's width transition and give .oo-loadingbar-done a fade-out.

How components are mounted, how switch values are resolved and how debug output is enabled is described in the use-js-components skill.

<div id="oo-loadingbar"></div>

component switches

This component has no switches.

Events

Element Event Description
#oo-loadingbar oo-loadingbar-done Fired every time the bar completes (all requests done).

After the very first completion the <body> gets the class oo-loadingbar-initial — use it to reveal content that should appear only once the shop has loaded.

debug options

Debug scope lb (enable with data-oo-debug="true" on the element or debug:lb:all+, see the skill):

Term Description
lb:all On / off / tick signals and the bar position.