0.0.1 • Published 3 years ago

svelte-loading-animation v0.0.1

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

svelte-loading-animation

Collection of simple and light-weight CSS loading animations / spinners for Svelte.

Available Loading Animations

Currently we have 7 loading animations | Animation | Component Name | Description | | ------ | --- | ---- | | Bars | LoadBars | 3 vertical bars animated | | Coin | LoadCoin | Flipping / spinning circle | | Ellipsis | LoadEllipsis | 3 dots animated | | Hour Glass | LoadHourGlass | Simple hour glass animation | | Ring | LoadRing | Chasing ring animation | | Ripple | LoadRipple | Ripple animation | | Spinner | LoadSpinner | Basic spinner |

Installation

npm install svelte-loading-animation

Usage

First you need to import the desired animation(s) on the script section

// ...
	import { LoadRing, LoadRipple } from 'sveltip';
// ...

and then use it on your application. Here's some example code:

  <LoadRipple />

  <LoadRing />

By default, they have Svelte's orange color and 64px*64px size. You can customize the looks by passing available properties.

Properties

PropertyDefaultAccepted Value
color#ff3e00Any CSS background color
size64pxInteger or decimal in px, em, rem

Some samples with props:

  <LoadHourGlass size="64px" color="#d43ef1"/>
  <LoadBars size="64px" color="red"/>
  <LoadSpinner size="5.5rem" color="rgba(0,0,0,.32)"/>

License

MIT