vibran

Top loading bar

Also called: YouTube-style progress

A top loading bar. A thin line at the top advances, slows near the end and closes when the page is done, like YouTube's bar. With data-fetch it follows real fetch requests.

Preview of Top loading bar running live
Copy the promptAdjust colors and speed

When to use it

For dashboards, shops and any site that swaps screens or fetches data without a full reload: the bar shows something is happening without covering content. With data-fetch="true" it starts and stops with fetch calls; in an SPA you can also call el.iniciar() and el.concluir() on route changes, and el.falhar() on errors (the bar turns red). Use data-fixo="true" to pin it to the top of the window.

How to add it to your site

  1. Copy the prompt in the gallery. It comes with the effect's name and the full code. The prompt text is written in Portuguese, and AI builders handle that fine.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. Done: the AI adds the effect to your project, just like you saw it here.

Use it in HTML

The effect is plain JavaScript, no library. Just put the data-efeito attribute on the element:

<main data-efeito="barra-topo" data-fetch="true">...</main>

More loaders effects

All 27 loaders effects →