GithubHelp home page GithubHelp logo

cdaz5 / react-loaders-spinners Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 304 KB

A component-based loaders/spinners React library, built with styled-components :nail_care:.

License: MIT License

JavaScript 100.00%
react styled-components css loaders spinners spinner-components loader-component spinner loader

react-loaders-spinners's Introduction

React-Loaders-Spinners

React Loaders Spinners

A component-based loaders/spinners React library, built with styled-components.

Demo - check out and play around with the examples here.

Why should you use this?

If you need highly customizable loader(s) or spinner(s) in your React project.

Getting started

yarn add react-loaders-spinners

or

npm i react-loaders-spinners

Note that react-loaders-spinners lists styled-components as a peerDependency, therefore it expects you to have styled-components already installed in your project.

import React from 'react';
import { BounceyLoader } from 'react-loaders-spinners';

const App = () => (
  <BounceyLoader />
)

Available Props/Defaults/Types

Standard Default Props For ALL Loaders

prop default
pColor:str #555
loading:bool true *req

Additional Available Props

Loader/Spinner height:int width:int sColor:str spaceBetween:int thickness:int rows:int lineHeight:int
PulseLoader 100 100 #f3f3f3
BounceyLoader 20 20 20
SpinLoader 50 50 #f3f3f3 10
BoxLoader 100 100
JamminLoader 10
ContentLoader 200 *req 4 *req 20

PLEASE NOTE: For ContentLoader width refers to the parent container's width (in px cannot be %). It will work without a width however the animation will be off slightly. It is the only loader where width does not refer to the actual loader's width. A use case would be:

  // ContentLoader example
  <div style={{ width: '500px' }}>
    <ContentLoader 
      width={500}
      rows={8}
      lineHeight={28}
    />
  </div>
  // props example
  <PulseLoader 
    width={200}
    height={200}
    pColor='dodgerblue' // can use hex or named color
    sColor='#FF711E' // can use hex or named color
  />

Contributing

I'd love to get some feedback and contribution from the community. Feel free to file an issue, create a pull request, or leave some feedback as to how you think this project can be improved! More loaders/spinners to be added soon!

react-loaders-spinners's People

Contributors

cdaz5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-loaders-spinners's Issues

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.