Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peterroe/uspin
A vue3 component that spins on load
https://github.com/peterroe/uspin
component loading vue3
Last synced: about 2 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 (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:17:18.000Z (6 months ago)
- Last Synced: 2024-01-23T02:49:35.219Z (4 months 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
Lists
- awesome-vue - uspin - A vue3 component that adds a spin mask at load time.🔄 (Components & Libraries / UI Components)
- 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 uspinconst 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
![img](https://img-blog.csdnimg.cn/9fa98b82a0f445a39d869fce28cd65cc.gif)