diff --git a/apps/docs/content/docs/configure.mdx b/apps/docs/content/docs/configure.mdx
index 0f4a20b..73c802f 100644
--- a/apps/docs/content/docs/configure.mdx
+++ b/apps/docs/content/docs/configure.mdx
@@ -13,16 +13,16 @@ The `configure()` method updates the default settings of the progress bar.
BProgress.configure({
minimum: 0.08,
maximum: 1,
- template: `
- `,
+ template: `
+ `,
easing: 'linear',
positionUsing: 'width',
speed: 200,
trickle: true,
trickleSpeed: 200,
showSpinner: true,
- barSelector: '[role="bar"]',
- spinnerSelector: '[role="spinner"]',
+ barSelector: '.bar',
+ spinnerSelector: '.spinner',
parent: 'body',
direction: 'ltr',
});
@@ -77,15 +77,15 @@ type BProgressDirection = 'ltr' | 'rtl';
|----------|------------------------|------------------------------------|-----------------------------------------------|
| minimum | number | 0.08 | The minimum percentage value between 0 and 1. |
| maximum | number | 1 | The maximum percentage value between 0 and 1. |
-| template | string \| null | `` | The template of the progress bar. Classes are important for CSS, but if you have a custom CSS you can put any classes you like. The roles depend on those configured in the `barSelector` and `spinnerSelector` options. |
+| template | string \| null | `` | The template of the progress bar. Classes needs to match with the `barSelector` and `spinnerSelector` options. |
| easing | string | 'linear' | The easing of the progress bar. |
| positionUsing | BProgressPositionUsing | 'width' | The position using of the progress bar. |
| speed | number | 200 | The speed of the progress bar. |
| trickle | boolean | true | If `true`, the progress bar will trickle. |
| trickleSpeed | number | 200 | The speed of the trickle. |
| showSpinner | boolean | true | If `true`, the progress bar will show the spinner. |
-| barSelector | string | '[role="bar"]' | The bar selector. |
-| spinnerSelector | string | '[role="spinner"]' | The spinner selector. |
+| barSelector | string | '.bar' | The bar selector. |
+| spinnerSelector | string | '.spinner' | The spinner selector. |
| parent | HTMLElement \| string | 'body' | The parent container of the progress bar. (if `template` is not `null`) |
| direction | BProgressDirection | 'ltr' | The direction of the progress bar. |
@@ -97,16 +97,16 @@ type BProgressDirection = 'ltr' | 'rtl';
```html
-
+
-
```
-It's very important to have a `div` with the `bprogress` class and the `display:none` style surrounding the template. For the template, classes are important for CSS, but if you have a custom CSS you can put any classes you like. The roles depend on those configured in the `barSelector` and `spinnerSelector` options.
+It's very important to have a `div` with the `bprogress` class and the `display:none` style surrounding the template. For the template, classes need to match with the `barSelector` and `spinnerSelector` options.
When using a custom component for the progress bar, the component will not be dynamically added or removed from the DOM. Instead, it will simply toggle between `display: block` and `display: none`.
diff --git a/apps/docs/content/docs/installation.mdx b/apps/docs/content/docs/installation.mdx
index 96de8cf..adc6db9 100644
--- a/apps/docs/content/docs/installation.mdx
+++ b/apps/docs/content/docs/installation.mdx
@@ -40,13 +40,11 @@ To install BProgress, run the following command:
### CDN
Use **unpkg**:
-- ESM: https://unpkg.com/@bprogress/core/dist/index.mjs
-- CJS: https://unpkg.com/@bprogress/core/dist/index.js
+- JS: https://unpkg.com/@bprogress/core/dist/index.js
- CSS: https://unpkg.com/@bprogress/core/dist/index.css
Use **jsDelivr**:
-- ESM: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.mjs
-- CJS: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.js
+- JS: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.js
- CSS: https://cdn.jsdelivr.net/npm/@bprogress/core/dist/index.css
### Integrations Libraries
diff --git a/apps/docs/content/docs/migration.mdx b/apps/docs/content/docs/migration.mdx
index 2920cbc..ca72b9b 100644
--- a/apps/docs/content/docs/migration.mdx
+++ b/apps/docs/content/docs/migration.mdx
@@ -7,7 +7,9 @@ import { Callout } from 'fumadocs-ui/components/callout';
To **clarify the library’s identity** and enable it to **evolve more freely**, we decided to move away from the name **NProgress-V2** and adopt a new identity: **BProgress**. This rebranding gives us the opportunity to **start fresh on a solid foundation, introduce new features, and provide more integration libraries** while fostering a richer ecosystem around the project.
-There are two differences with the `nprogress-v2` package.
+There are some differences with the `nprogress-v2` package.
+
+## Migration to BProgress `1.1`
The first difference is the name of the `nprogress-v2` package, which is now called `@bprogress/core`. So you can change the import like this:
@@ -32,6 +34,25 @@ CSS has also changed, so if you're using custom CSS, be sure to rename all your
+ .bprogress
```
+## Migration to BProgress `1.2`
+
+The difference is about the `template`, `barSelector` and `spinnerSelector` options. We no longer use roles as selectors, as the “bar” and “spinner” roles are not valid ARIA roles.
+
+So you can change your code like this (only if you use these options):
+
+```diff title=JavaScript
+- NProgress.configure({
+- template: ``,
+- barSelector: '[role="bar"]',
+- spinnerSelector: '[role="spinner"]',
+- });
++ BProgress.configure({
++ template: '',
++ barSelector: '.bar',
++ spinnerSelector: '.spinner',
++ });
+```
+
And then you can use the `BProgress` object as you would use the `NProgress` object.
diff --git a/apps/docs/content/docs/next/whats-new.mdx b/apps/docs/content/docs/next/whats-new.mdx
index bad37e3..b15c219 100644
--- a/apps/docs/content/docs/next/whats-new.mdx
+++ b/apps/docs/content/docs/next/whats-new.mdx
@@ -70,7 +70,7 @@ This, combined with the `disableStyle` property, allows you to make your progres
### `useRouter` (only for App directory)
A new `basePath` option has been added to the router.
-This option is only useful if you use a `basePath` in your `next.config.mjs` file.
+This option is only useful if you use a `basePath` in your `next.config.(js|mjs|ts)` file.
```tsx
const router = useRouter(undefined, { basePath: '/docs' });
diff --git a/apps/docs/content/docs/quick-start.mdx b/apps/docs/content/docs/quick-start.mdx
index d3c9958..8c815fd 100644
--- a/apps/docs/content/docs/quick-start.mdx
+++ b/apps/docs/content/docs/quick-start.mdx
@@ -17,7 +17,7 @@ Import JavaScript in your `index.html` file.
```html