Back to rankings

greyby/vue-spinner

Vuegreyby.github.io/vue-spinner/

vue spinners

vuevuejsspinnervue3loaderspinnersvuejs-componentsvue-spinnerscss-animationscss-loadersloading-animationsloading-spinner
Star Growth
Stars
1.8k
Forks
174
Weekly Growth
Issues
4
1.8k
Jul 18Jul 19Jul 20Jul 20
README

vue-spinner

A collection of loading spinners with Vue.js 3. Based on Halogen by yuanyan.

vue-spinner version Vue version
3.x Vue 3.x
1.0.4 Vue 1.x / 2.x

Live Demo

Installation

npm install vue-spinner

Usage

import { PulseLoader } from 'vue-spinner'
import 'vue-spinner/style.css'
<template>
  <pulse-loader :loading="loading" :color="color" :size="size"></pulse-loader>
</template>

<script setup>
import { ref } from 'vue'
import { PulseLoader } from 'vue-spinner'
import 'vue-spinner/style.css'

const loading = ref(true)
const color = ref('#5dc596')
const size = ref('15px')
</script>

Global Registration

import { createApp } from 'vue'
import { PulseLoader } from 'vue-spinner'
import 'vue-spinner/style.css'

const app = createApp(App)
app.component('PulseLoader', PulseLoader)

Compatibility Imports

If you are upgrading existing code, these imports remain available:

import 'vue-spinner/dist/vue-spinner.css'
import PulseLoader from 'vue-spinner/src/PulseLoader.vue'

Browser (UMD)

<script src="path/to/vue.global.js"></script>
<script src="path/to/vue-spinner.umd.js"></script>
<script>
  const { PulseLoader, GridLoader } = VueSpinner
</script>

Available Spinners

<pulse-loader :loading="loading" :color="color" :size="size"></pulse-loader>
<grid-loader :loading="loading" :color="color" :size="size"></grid-loader>
<clip-loader :loading="loading" :color="color" :size="size"></clip-loader>
<rise-loader :loading="loading" :color="color" :size="size"></rise-loader>
<beat-loader :loading="loading" :color="color" :size="size"></beat-loader>
<sync-loader :loading="loading" :color="color" :size="size"></sync-loader>
<rotate-loader :loading="loading" :color="color" :size="size"></rotate-loader>
<fade-loader :loading="loading" :color="color" :height="height" :width="width"></fade-loader>
<pacman-loader :loading="loading" :color="color" :size="size"></pacman-loader>
<square-loader :loading="loading" :color="color" :size="size"></square-loader>
<scale-loader :loading="loading" :color="color" :height="height" :width="width"></scale-loader>
<skew-loader :loading="loading" :color="color" :size="size"></skew-loader>
<moon-loader :loading="loading" :color="color" :size="size"></moon-loader>
<ring-loader :loading="loading" :color="color" :size="size"></ring-loader>
<bounce-loader :loading="loading" :color="color" :size="size"></bounce-loader>
<dot-loader :loading="loading" :color="color" :size="size"></dot-loader>

Props

All spinners accept the following props (with defaults):

Prop Type Default Description
loading Boolean true Show/hide the spinner
color String '#5dc596' Spinner color
size String varies Spinner size (most spinners)
margin String '2px' Margin between elements
radius String varies Border radius

Some spinners use height and width instead of size (e.g., FadeLoader, ScaleLoader).

Local Development

npm install
npm run dev

Build

npm run build

Output: dist/vue-spinner.es.js (ESM) + dist/vue-spinner.umd.js (UMD) + dist/vue-spinner.css

License

vue-spinner is licensed under The MIT License.

Related repositories
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

TypeScriptnpmMIT Licensevuejavascript
v2.vuejs.org
210.1k33.8k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

GNU General Public License v3.0pythonjavascript
weibo.com/justjavac
117.7k28.2k
storybookjs/storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

TypeScriptnpmMIT Licensestorybookstyleguide
storybook.js.org
90.6k10.2k
PanJiaChen/vue-element-admin

:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin

VueMIT Licensevueadmin
90.2k30.4k
hoppscotch/hoppscotch

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

TypeScriptnpmMIT Licenseapiapi-client
hoppscotch.io
79.8k6k
nuxt/nuxt

the full-stack Vue framework

TypeScriptnpmMIT Licensecsrfull-stack
nuxt.com
60.6k5.7k
marktext/marktext

📝A simple and elegant markdown editor, available for Linux, macOS and Windows.

TypeScriptnpmMIT Licensemacostypewriter-mode
marktext.me
59k4.4k
go-gitea/gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

GoGo ModulesMIT Licensegiteagolang
gitea.com
56.9k6.9k
ElemeFE/element

A Vue.js 2.0 UI Toolkit for Web

VueMIT Licensevuecomponents
element.eleme.io
54.1k14.4k
ionic-team/ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

TypeScriptnpmMIT Licenseionicmobile
ionicframework.com
52.6k13.3k
lyswhut/lx-music-desktop

一个基于 Electron 的音乐软件

TypeScriptnpmApache License 2.0music-playerjavascript
lyswhut.github.io/lx-music-doc/
52.2k6.9k
prettier/prettier

Prettier is an opinionated code formatter.

JavaScriptnpmMIT Licenseformatterprinter
prettier.io
52.1k4.9k