Skip to content

Latest commit

 

History

History
119 lines (87 loc) · 1.83 KB

README.md

File metadata and controls

119 lines (87 loc) · 1.83 KB

Loading Component

A plugin developed with Vue 3 and vite.js.

vue version vue version

Installing

Package manager

Using npm:

npm install @mustafadalga/loading-spinner

Then, import and register the component:

Global Registration

main.js

import Loader from "@mustafadalga/loading-spinner";
import "@mustafadalga/loading-spinner/style.css"

app.use(Loader);

Local Registration

  • Composition Api
<script setup>
import { Loader } from "@mustafadalga/loading-spinner";
import "@mustafadalga/loading-spinner/style.css";
</script>
  • Options Api
import { Loader } from "@mustafadalga/loading-spinner";
import "@mustafadalga/loading-spinner/style.css";

export default {
  components: {
    Loader
  },
}

Usage

  • Example 1
<script setup>
import icon from './assets/icons/icon.svg'
</script>

<template>
  <main>
    <Loader :icon="icon"/> 
  </main>
</template>
  • Example 2
<script>
import icon from './assets/icons/icon.svg'

export default {
  data () {
    return {
      icon: icon
    }
  }
}
</script>

<template>
  <main>
    <Loader :icon="icon"/> 
  </main>
</template>
  • Example 3
<script setup>
import icon from './assets/icons/icon.svg'
</script>

<template>
  <main>
    <Loader :icon="icon">
      <template #description>
        Please Wait...
      </template>
    </Loader>
  </main>
</template>

Demo

License

License