https://github.com/peterroe/uspin
A vue3 component that spins on load
https://github.com/peterroe/uspin
component loading vue3
Last synced: 9 months ago
JSON representation
A vue3 component that spins on load
- Host: GitHub
- URL: https://github.com/peterroe/uspin
- Owner: peterroe
- Created: 2022-03-29T04:58:54.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:17:18.000Z (over 2 years ago)
- Last Synced: 2024-04-12T17:17:50.493Z (almost 2 years ago)
- Topics: component, loading, vue3
- Language: Vue
- Homepage:
- Size: 84 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-vue - uspin - A vue3 component that adds a spin mask at load time.🔄 (Components & Libraries / UI Components)
README
## uspin
A vue3 component that spins on load
## Install
```shell
$ npm install uspin
```
## Usage
```html
import { ref } from 'vue'
import { hide, show } from 'uspin' // import uspin
const targetRef = ref<HTMLElement | undefined>(undefined)
💻 A front end developer.
🥉 Working Rss-Reader based on tauri-app.
🦄 Enjoy JavaScript,VueJs and NodeJs.
🍉 Hobby maybe blogging and write open source tools.
💨 Visit peterroe.icu for more information.
show
hide
```
## Config
```ts
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, config?: SpinConfig): void
export declare function hide(targetRef: Ref): void
```
## Preview
