Socket
Book a DemoInstallSign in
Socket

react-simple-animate

Package Overview
Dependencies
Maintainers
2
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-animate

react simple animate

Source
npmnpm
Version
1.5.4-beta.2
Version published
Weekly downloads
486K
-3.15%
Maintainers
2
Weekly downloads
 
Created
Source

React Simple Animate

npm version npm downloads npm npm

Make web animation simple :clap:

Features:

  • Simple animation from inline style A to style B
  • Make animation toggle easy
  • In-built delay animation mechanism
  • Tiny size 3,878 bytes (before Gzip)

Install

$ yarn add react-simple-animate
or
$ npm install react-simple-animate -S

Example

Navigate into example folder and install

$ yarn && yarn start
or
$ npm install && npm run start

Screenshot of the example app below

Screenshots

Quick start

import react from 'react';
import Animate from 'react-simple-animate';

export default function SexyComponent() {
    return <Animate durationSeconds={0.2}
         startAnimation
         delaySeconds={1.2}
         startStyle={{
           opacity: 0,
         }}
         endStyle={{
           opacity: 1,
         }}
       >
       <YourComponent> // your component here
    </Animate>;
}

API

PropTypeRequiredDescription
startAnimationbooleanDefaults to false. Set to true to start the animation.
childrennodeChild component to be animated.
startStylestringComponent initial inline style.
endStylestringComponent transition to inline style.
tagstringDefault tag is div, this allow custom tag to be wrap around.
onCompleteStylestringStyle to be applied after the animation is completed.
durationSecondsnumberHow long the animation takes in seconds.
delaySecondsnumberHow much delay should apply before animation starts.
onCompletefunctionCall back function after animation complete.
easeTypestringEasing type refer to http://easings.net/
classNamestringTo specify a CSS class.
forceUpdatebooleanForce component to re-render.

Keywords

react

FAQs

Package last updated on 23 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts