ReactProgress Components

Spinner

Use the `Spinner` component

The Spinner component must be used inside the Progress component.

Import

import { Spinner } 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

This component is used to display the spinner.

<Spinner />

It can be used with a children like SpinnerIcon:

<Spinner>
  <SpinnerIcon />
</Spinner>

Or with a custom spinner component like this:

<Spinner>
  <LoaderCircle className="animate-spin size-6" />
</Spinner>

Props

NameTypeDefaultDescription
asReact.ElementType'div'The component to render the progress element
childrenReact.ReactNodeundefindedThe children of the progress element
classSelectorstring'spinner'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