1.3.0 • Published 2 years ago

uspin v1.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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

img

1.3.0

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago