A lil spinner custom element
npm install lil-spinnerA lil spinner custom element
It'll only work in browsers with custom elements v1 support. There's probably some polyfill that'll make it work in other browsers.
Load this script somewhere in your HTML:
And use this in the HTML where you want a spinner to show up:
Or, if you are using this in another Svelte 3 component, you can import Spinner from 'lil-spinner'; (in conjunction with @rollup/plugin-node-resolve or something like that).