Quick Start

Get started with BProgress

Import

CDN

Import CSS in your index.html file.

<link rel="stylesheet" type="text/css" href="https://unpkg.com/@bprogress/core/dist/index.css" />

Import JavaScript in your index.html file using the modern import syntax:

<script type="module">
  import { BProgress } from 'https://unpkg.com/@bprogress/core/dist/index.js';
 
  BProgress.configure({
    ...
  });
</script>

Or you can add BProgressJS as a global variable using the legacy include:

<script src="https://unpkg.com/@bprogress/core/dist/index.global.js"></script>
<script>
  const { BProgress } = BProgressJS;
 
  BProgress.configure({
    ...
  });
</script>

Node.js

import '@bprogress/core/css';
import { BProgress } from '@bprogress/core';

Basic Usage

Simply call start() and done() to control the progress bar.

BProgress.start();
BProgress.done();

On this page