uspin
uspin
A vue3 component that spins on load
Install
$ npm install uspin
Usage
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { hide, show } from 'uspin'
const targetRef = ref(null)
</script>
<template>
<div ref="targetRef" class="demo">hello</div>
<div class="demoButton">
<button @click="show(targetRef)">show</button>
<button @click="hide(targetRef)">hide</button>
</div>
</template>
Config
export interface SpinConfig {
logoColor?: string // default: '#fff'
size?: string // default: '5em'
bgColor?: string // default: '#ddd'
opacity?: number // default: 0.5
}
export declare function show(targetRef: Ref<Element>, config?: SpinConfig): void
export declare function hide(targetRef: Ref<Element>): void
Preview

Related Packages
vite-plugin-git-revision
Vite plugin that generates VERSION and COMMITHASH files during build based on a...
21,961
11
vite-plugin-resolve-extension-vue
A temporary workaround for issue No loader is configured for ".vue"
6,993
5
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.0 | 3.2.31 | MIT | |
| 1.2.0 | 3.2.31 | MIT | |
| 1.1.4 | 3.2.31 | MIT | |
| 1.1.3 | 3.2.31 | MIT | |
| 1.1.2 | 3.2.31 | MIT | |
| 1.1.1 | 3.2.31 | MIT | |
| 1.1.0 | 3.2.31 | MIT | |
| 1.0.0 | 3.2.31 | MIT |