How rstacruz/nprogress works
NProgress is a small browser-side progress-bar library. Applications (including Ajax, Turbolinks, and Pjax integrations) call its API to configure and advance progress; the library renders and animates the bar in the DOM, then removes it when complete. Its runtime is concentrated in nprogress.js; the README documents supported controls and integration patterns. The source excerpt is partial, so internal links reflect only calls visible there or explicit README statements.
Main entry points: nprogress.js Progress controls · nprogress.css Bar styles
Components 10
Progress API
- Progress controls
nprogress.js - Settings
nprogress.js - Promise tracking
nprogress.js
Rendering Runtime
- DOM rendering
nprogress.js - Animation queue
nprogress.js
Presentation
- Bar styles
nprogress.css
Other components
- Application
- Ajax / navigation events
- Browser DOM
- Progress display
Connections 10
- Application → Progress controls: calls
Readme.md - Ajax / navigation events → Progress controls: starts / completes
Readme.md - Application → Settings: configures
Readme.md - Application → Promise tracking: tracks promises
nprogress.js - Progress controls → DOM rendering: renders
nprogress.js - Promise tracking → Progress controls: starts / increments
nprogress.js - Progress controls → Animation queue: queues animation
nprogress.js - DOM rendering → Browser DOM: inserts / removes
nprogress.js - DOM rendering → Progress display: creates bar
nprogress.js - Bar styles → Progress display: styles
Readme.md