项目作者: radlinskii

项目描述 :
A simple spinning loading animation react component.
高级语言: JavaScript
项目地址: git://github.com/radlinskii/react-loading-spin.git
创建时间: 2018-04-23T14:32:00Z
项目社区:https://github.com/radlinskii/react-loading-spin

开源协议:MIT License

下载


react-loading-spin CI npm version npm PRs Welcome License: MIT

A simple reusable animated spinner react component.

Preview

Alt Text

Install

  1. npm i --save react-loading-spin

Import

  1. import LoadingSpin from "react-loading-spin";

Use

  1. const ExampleOfUsingDefaultLoadingSpin = () => (
  2. <div className={"ExampleOfUsage"}>
  3. <LoadingSpin ></LoadingSpin>
  4. </div>
  5. );

Alt Text

Manage Properties

Property name type Required Default value Comment
size string false ‘60px’ CSS length value for height and width of the spinner
width string false ‘6px’ CSS length value for width the spinner
primaryColor string false ‘#1ecd96’ CSS color value for one half of the loader
secondaryColor string false ‘#cccccc’ CSS color value for second half of the loader
animationDuration string false ‘2s’ CSS animation-durationproperty value
animationTimingFunction string false ‘ease-in-out’ CSS animation-timing-function property value
animationDirection string false ‘normal’ CSS animation-direction property value
numberOfRotationsInAnimation number false 2 number of spins during single animation
  1. const ExampleOfUsingLoadingSpinWithProps = () => (
  2. <div className={"ExampleOfUsage"}>
  3. <LoadingSpin
  4. duration="2s"
  5. width="15px"
  6. timingFunction="ease-in-out"
  7. direction="alternate"
  8. size="200px"
  9. primaryColor="yellow"
  10. secondaryColor="#333"
  11. numberOfRotationsInAnimation={2}
  12. ></LoadingSpin>
  13. </div>
  14. );

Alt Text

Built With

License

MIT - see the LICENSE file for details.