GithubHelp home page GithubHelp logo

minhuaf / styled-loaders Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saravieira/styled-loaders

0.0 2.0 0.0 495 KB

Loaders Built with Preact and Styled Components

Home Page: https://styled-loaders.now.sh/

License: Other

JavaScript 100.00%

styled-loaders's Introduction

Styled Loaders

Build Status styled with prettier npm version

Loaders Built with Preact and Styled Components ready for your next project because no one deserves to have to writes loadings all the time.

If you are looking for a React version you can find one here by the awesome Sai Sandeep Vaddi

Credits and inspiration also belong heavily to the awesome work at SpinKit

As I work on more projects over time more and more loaders will be added here.

Usage

npm i styled-loaders
or
yarn add styled-loaders
import { h } from 'preact'
import { Cube } from 'styled-loaders'

const Page = ({ loading }) =>
    <main>
        { loading ?
            <Cube/>
            : 'Your Content'
        }
    </main>

With Props

import { h } from 'preact'
import { Block } from 'styled-loaders'

const Page = ({ loading }) =>
    <main>
        { loading ?
            <Block color="red" size="60px" duration="5s" />
            : 'Your Content'
        }
    </main>

Loaders

  • Block Block

    • Props
      • color - Background of the spinner default is #333
      • duration - Animation duration default is 1.2s
      • size - Size of the spinner default is 40px
  • Circular Circular

    • Props
      • color - Background of the spinner default is #333
      • size - Size of the spinner default is 40px
  • Cube Cube

    • Props
      • color - Background of the spinner default is #333
      • size - Size of the spinner default is 40px
      • cubeSize - Size of the each cube default is 15
      • duration - Animation duration default is 1.2s
  • CubeGrid CubeGrid

    • Props
      • color - Background of the spinner default is #333
      • size - Size of the spinner default is 40px
  • DotScale DotScale

    • Props
      • color - Background of the spinner default is #333
      • duration - Animation duration default is 1.2s
      • size - Size of the spinner default is 40px
      • dotSize - Size of the dots default is 18px
  • Pulsate Pulsate

    • Props
      • color - Background of the spinner default is #333
      • duration - Animation duration default is 1.2s
      • size - Size of the spinner default is 40px
  • RotateScale RotateScale

    • Props
      • color - Background of the spinner default is #333
      • duration - Animation duration default is 1.2s
      • size - Size of the spinner default is 40px
  • Scale Scale

    • Props
      • color - Background of the spinner default is #333
      • duration - Animation duration default is 1.2s
      • size - Size of the spinner default is 40px
  • Stretch Stretch

    • Props
      • color - Background of the spinner default is #333
      • duration - Animation duration default is 1.2s
      • size - Size of the spinner default is 40px
      • rectWidth - Width of each rectangle default is 6px

License

MIT (2017 - Sara Vieira)

styled-loaders's People

Contributors

itsjw avatar morajabi avatar saravieira avatar vutran avatar

Watchers

 avatar  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.