VueProgress Components

Spinner

Use the `Spinner` component

The Spinner component must be used inside the Progress component.

Import

<script setup lang="ts">
import { Spinner } from '@bprogress/...';
</script>

Note

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

Usage

This component is used to display the spinner.

<template>
  <Spinner />
</template>

It can also be used with a slot to insert a child component (like a custom component) as follows:

<template>
  <Spinner>
    <SpinnerIcon />
  </Spinner>
</template>

Or with a custom spinner component like this:

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

Props

NameTypeDefaultDescription
isstring | Component'div'The component or HTML element to render. This prop uses Vue's is attribute for dynamic rendering.
classClassValueundefindedThe class of the progress element
classSelectorstring'spinner'The class selector of the progress element (depends on your css)
...restHTMLAttributes-Other attributes passed down to the rendered element

On this page