People wait more patiently when they can watch a number go up, and the bar shows how much is left.
Image-heavy first loads of one to two seconds, where the assets need to be ready before the reveal.
A counter that hits 100 before anything has loaded, or one that runs longer than 2.5 seconds.
<!-- HTML --> <div class="loader"><span class="num">0</span><div class="track"><i class="fill"></i></div></div> // JS · GSAP const num = document.querySelector(".num"); const fill = document.querySelector(".fill"); const o = { v: 0 }; gsap.to(o, { v: 100, duration: 1.8, ease: "power3.inOut", onUpdate: () => { num.textContent = Math.round(o.v); fill.style.width = o.v + "%"; }, onComplete: revealPage, });