Vue

vue-loading-spinner

Just another collection of loading spinners with Vue.js, alot of spinners

N

nguyenvanduocit

Dernière activité 25 févr. 2026
nguyenvanduocit/vue-loading-spinner

681

étoiles

103

forks

4

issues ouvertes

Ce README est souvent en anglais.

vue-loading-spinner

Loading spinner collection for Vue 3

Installation

bun add vue-loading-spinner

Usage

Individual components

<template>
  <RotateSquare2 />
</template>

<script setup>
import { RotateSquare2 } from 'vue-loading-spinner'
</script>

Plugin (register all components globally)

import { createApp } from 'vue'
import VueLoadingSpinner from 'vue-loading-spinner'
import 'vue-loading-spinner/dist/vue-loading-spinner.css'

const app = createApp(App)
app.use(VueLoadingSpinner)

Props

All spinners accept a size prop (default '40px'). Most accept a color prop (default '#41b883'). Some accept duration, secondaryColor, or spinnerColor.

<Circle size="60px" />
<DoubleBounce size="50px" color="#3498db" duration="1.5s" />
<Hexagon size="80px" color="#e74c3c" spinner-color="#c0392b" />

Composables

useLoading

Manage loading state with async support.

<template>
  <Circle v-if="isLoading" />
  <button @click="fetchData">Load</button>
</template>

<script setup>
import { Circle, useLoading } from 'vue-loading-spinner'

const { isLoading, withLoading } = useLoading()

const fetchData = () => withLoading(() => fetch('/api/data'))
</script>

useSpinner / useScaledSpinner

Internal composables for building custom spinners with consistent size/scale behavior.

Available Spinners

Circle, Circle2-11, CubeShadow, Diamond, DoubleBounce, Gauge, Google, Hexagon, HourGlass, Jawn, Jumper, LetterCube, MikePad, Origami, Pencil, PingPong, Plane, RotateSquare, RotateSquare2-6, ScaleOut, Socket, SpinLine, SquareGrid, Stretch, Texture, ThreeDots, TwoCube, Wave

Development

bun install
bun run build
bun run typecheck

Projets similaires

vue spinners

Vuecss-animationscss-loaderscss-spinners
Ggreyby
1,8 k étoiles171

This is a library having a collection of different types of CSS loaders, spinners

CSSanimationcss3loading-spinner
Vvineethtrv
1,7 k étoiles182

A collection of loading spinner components for react

TypeScriptcomponentloaderloading
Ddavidhu2000
3,4 k étoiles283