web-component-amazing-loading

1.0.9 • Public • Published

Web Component Amazing Loading

NPM License

Lightweight loading animation < 10k 😎
Compatible with React, Vue, Angular & other frameworks.

amazing-loading

Vue usage

npm i web-component-amazing-loading

<script setup>
import AmazingLoading from 'web-component-amazing-loading';

let amazingLoadingElement = null;

onMounted(() => {
  amazingLoadingElement = document.querySelector('#amazing-loading');

  const showLoadingButton = document.querySelector('#show-loading-button');
  showLoadingButton.addEventListener('click', showLoading)
});


function showLoading(event) {
  amazingLoadingElement.showLoading();
}
</script>


<template>
<amazing-loading id="amazing-loading"/>
</template>

vite config

export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          isCustomElement: (tag) => tag.includes('amazing-loading')
        }
      }
    })
  ],

Contact

Feel free to ping me 💫
connect@giladshohat.com

giladshohat.com

Package Sidebar

Install

npm i web-component-amazing-loading

Weekly Downloads

1

Version

1.0.9

License

MIT

Unpacked Size

6.56 kB

Total Files

4

Last publish

Collaborators

  • gshohat