ReactProgress Components

Bar

Use the `Bar` component

The Bar component must be used inside the Progress component.

Import

import { Bar } from '@bprogress/...';

Note

Replace the ... in the import with the library you're using. For example, if you use @bprogress/next, import by doing from '@bprogress/next'

Usage

The Bar component is used to create the progress bar element.

<Bar />

It can be used with a children (like Peg or your custom component) like this:

<Bar>
  <Peg />
</Bar>

Props

NameTypeDefaultDescription
asReact.ElementType'div'The component to render the progress element
childrenReact.ReactNodeundefindedThe children of the progress element
classSelectorstring'bar'The class selector of the progress element (depends on your css)
...restReact.ComponentPropsWithoutRef<T>-The rest of the props are passed to the progress element

On this page