Vue 3 Spinners is a collection of lightweight, customizable loading spinner components specifically designed for Vue 3 applications. Currently at version 1.3.3, it provides a variety of visually appealing spinners, many of which are derived from Quasar's spinner components and a Vue port of React Spinners. The library is actively maintained, with updates released as new features or bug fixes are introduced, though without a strict release cadence. Key differentiators include its pure Vue component implementation, support for both global and individual component registration, and extensive customization options via props like `color`, `size`, `height`, `width`, `radius`, and `margin`, allowing developers to integrate animated loading indicators seamlessly into their user interfaces. It aims to provide a performant and flexible solution for showing progress or loading states without external CSS frameworks.
npm install vue3-spinnersVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and conditionally render a specific spinner (`VueSpinnerBars`) in a Vue 3 component using `<script setup>`, simulating a data loading process. It showcases basic prop usage for size and color.
Always use `npm install vue3-spinners` or `yarn add vue3-spinners` for Vue 3 projects.
Consult the package's GitHub documentation (https://github.com/leonsilicon/vue3-spinners/tree/main/packages/vue3-spinners/src/spinners) to verify which props are accepted by each individual spinner component.
Use `<Suspense>` when you need to wait for multiple asynchronous child components to resolve before showing content. For simpler data fetching or state-driven loading, a `v-if` or `v-show` with a local spinner component is often sufficient and more straightforward.
Ensure you have `import { VueSpinnerXXX } from 'vue3-spinners';` in your script block and either listed in the `components` option (for Options API) or directly used in the template (for `<script setup>`). For global registration, verify `app.use(VueSpinnersPlugin);` is called in your main.ts/main.js file.Check the documentation or source code for the specific spinner component you are using to confirm its supported props. Ensure you are only passing valid props like `color`, `size`, or other component-specific ones.