@bprogress/core

中文文档
1.3.4发布于 2025/04/14MITTypeScriptESM + CJS零依赖近 30 天下载 154.4万

NProgress-inspired library with more features

原始使用文档
文档目录11 节
  1. Migration from nprogress-v2
  2. Installation
  3. Node.js
  4. CDN
  5. Integrations libraries
  6. Quick Start
  7. Import
  8. Basic Usage
  9. More information on documentation
  10. Issues
  11. LICENSE

BProgress

A slim progress bar inspired by NProgress.

NProgress V2 and Next NProgress Bar become BProgress!

Migration from nprogress-v2

If you are using nprogress-v2, you can migrate to @bprogress/core by following the migration guide.

Installation

Node.js

To install BProgress, run the following command:

npm install @bprogress/core

CDN

Use unpkg:

  • JS: https://unpkg.com/@bprogress/core/dist/index.global.js
  • ESM: https://unpkg.com/@bprogress/core/dist/index.js
  • CSS: https://unpkg.com/@bprogress/core/dist/index.css

Use jsDelivr:

  • JS: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.global.js
  • ESM: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.js
  • CSS: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.css

Integrations libraries

The following frameworks have a dedicated package for using BProgress:

Quick Start

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.

<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();

More information on documentation

Go to the documentation to learn more about BProgress.

Issues

If you encounter any problems, do not hesitate to open an issue or make a PR here.

LICENSE

MIT

版本与发布记录

@bprogress/core 共发布 21 个版本,首次发布于 2025/02/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.3.4latest2025/04/141.6 年前
1.3.32025/03/141.7 年前
1.3.22025/03/121.7 年前
1.3.12025/03/091.7 年前
1.3.02025/03/081.7 年前
1.3.0-canary.02025/03/081.7 年前

关于 @bprogress/core 的常见问题

@bprogress/core 是什么?

NProgress-inspired library with more features

如何安装 @bprogress/core?

在项目目录运行 npm install @bprogress/core,或使用 pnpm add / yarn add / bun add。

@bprogress/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bprogress/core 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bprogress/core 可以商用吗?

@bprogress/core 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bprogress/core 的下载量有多少?

根据 npm 官方下载统计,@bprogress/core 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,544,481 次,日均约 51,483 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bprogress/core 还在维护吗?

最新版本 1.3.4 发布于 2025/04/14(1.6 年前);至今共发布 21 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/02/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。