Giter VIP home page Giter VIP logo

svelte-loading-spinners's Introduction

svelte-loading-spinners

collection of loading spinners with Svelte.js

Installation

npm i --save-dev svelte-loading-spinners

or

yarn add -D svelte-loading-spinners

Usage

Import navigating from $app/stores. When navigating starts, it's value is a Navigation object with from, to, type and (if type === 'popstate') delta properties. When navigating finishes, its value reverts to null.

Read More: Sveltekit Docs and Stackoverflow

By using an {#if $navigating} this allows us to show the loading animation when the page is loading and stop once it's fully rendered.

<script>
	import { Jumper } from 'svelte-loading-spinners';
	import { navigating } from '$app/stores'
</script>

{#if $navigating}
	<Jumper size="60" color="#FF3E00" unit="px" duration="1s" />
{/if}

List of available spinners

Props: size, color, unit, duration and pause. The default props; unit is px, color is #FF3E00 and size 60px.

Notes:

Circle2 instead of the color and duration props has colorOuter, colorCenter, colorInner, durationOuter, durationCenter, durationInner props.

Circle3 has ballTopLeft, ballTopRight, ballBottomLeft and ballBottomRight as props aswell.

Loaders
BarLoader
Chasing
Circle
Circle2
Circle3
DoubleBounce
Firework
Jellyfish
Jumper
Pulse
Rainbow
RingLoader
ScaleOut
Shadow
SpinLine
Stretch
SyncLoader
Wave
Square
Moon

Demo

List of all spinner: Demo

Development Setup

svelte-loading-spinners's People

Contributors

schum123 avatar johannchopin avatar bentimor avatar brollb avatar ethanbehrends avatar jramiroz98 avatar flmath avatar mxfactorial avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.