gitmyhub

nprogress

JavaScript ★ 26k updated 4y ago

For slim progress bars like on YouTube, Medium, etc

A tiny JavaScript library that adds a slim loading bar at the top of your web page, the same style you see on YouTube, to show users something is happening during page loads or data fetches.

JavaScriptCSSsetup: easycomplexity 1/5

NProgress is a tiny JavaScript library that adds the thin loading bar you see at the top of pages on YouTube and Medium — that slim colored line that slides across the top of the browser and fills in as a page loads. It's a small visual cue that tells users something is happening, which reduces the feeling of a page being "frozen" or unresponsive.

For a vibe coder building a web app with tools like Lovable or Bolt, or anyone adding polish to a website, NProgress is one of the easiest UI improvements you can add. You install it with one command, then call two functions in your code: one to start the bar when a request begins, and one to complete it when the request finishes. The whole library is minimal by design — the CSS file is tiny and easy to customize by changing a single color value.

It works great for any situation where your app fetches data or navigates between pages, giving users visual feedback without a jarring full-page spinner. It's particularly popular with older web frameworks, but it works with any JavaScript project.

The library is well-established and used across thousands of production websites — it's the kind of small, focused tool that just does one thing reliably. Adding it to a project built on Cursor or Replit is straightforward even without deep coding knowledge, as the integration typically takes just a few lines.

Where it fits