npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

animate-styled

v3.0.3

Published

library for animations CSS in react with styled-components

Downloads

273

Readme

AnimateStyled

npm version npm MIT

small contribution for those who work with react and styled-components

AnimateStyled is just a library based on the great work done by the people of animate.css led to the stack of react and styled-components.

Installation

via yarn, just follow these simple commands:

$ yarn add animate-styled

or via npm:

$ npm install animate-styled --save

Basic use

import in your file js

...
import { AnimateStyled } from "animate-styled"
...
render(){
  return(
    <AnimateStyled name="hinge">
      <h1>Mi contenido</h1>   /* children is required */
    </AnimateStyled>
  )
}

Properties

| Name props | Default | Type | Values | |-----------------|---------|-------|----------| | name | shake | String | names of animations | | duration | 2s | String | 1s, 300ms... | | timingFunction | linear | String | ease, ease-in, ease-out, ease-in-out, linear, step-start, step-end | | delay | 0s | String | 1s, 300ms... | | iterationCount | infinite | String, Number | 0 , 1 , 3 , infinite | | direction | normal | String | normal, reverse, alternate, alternate-reverse | | fillMode | none | String | none, forwards, backwards, both| | playState | running | String | running, paused | | transformOrigin | center | String | center, 50%, top bottom, 10% 80% ...| | backfaceVisibility | hidden | String | hidden, visible | | opacity | 0 | Number | 0 -> 1 | | style | undefined | React.CSSProperties | | | children | Hello World | ReactNode |

Names of animations

For test all animation click here


| Attention Seekers | Specials | Flippers | LightSpeed | |--------------------|----------|----------|------------| | bounce | hinge | flip | lightSpeedInLeft | | flash | jackInTheBox | flipInX | lightSpeedInRight | | headShake | rollIn | flipInY | lightSpeedOutLeft | | heartBeat | rollOut | flipOutX | lightSpeedOutRight | | jello | | flipOutY | | pulse |
| rubberBand |
| shake | | shakeX | | shakeY | | swing | | tada | | wobble |


| BackEntrances | BackExits | BouncingEntrances | BouncingExits | |---------------|-----------|-------------------|---------------| | backInDown | backOutDown | bounceIn | bounceOut | | backInLeft | backOutLeft | bounceInDown | bounceOutDown | | backInRight | backOutRight | bounceInLeft | bounceOutLeft | | backInUp | backOutUp | bounceInRight | bounceOutRight | | | | bounceInUp | bounceOutUp |


| FadingEntrances | FadingExits | RotatingEntrances | RotatingExits | |-------------------|---------------|---------------------|-----------------| | fadeIn | fadeOut | rotateIn | rotateOut | fadeInBottomLeft | fadeOutBottomLeft | rotateInDownLeft | rotateOutDownLeft | fadeInBottomRight | fadeOutBottomRight | rotateInDownRight | rotateOutDownRight | fadeInDown | fadeOutDown | rotateInUpLeft | rotateOutUpLeft | fadeInDownBig | fadeOutDownBig | rotateInUpRight | rotateOutUpRight | fadeInLeft | fadeOutLeft | fadeInLeftBig | fadeOutLeftBig | fadeInRight | fadeOutRight | fadeInRightBig | fadeOutRightBig | fadeInTopLeft | fadeOutTopLeft | fadeInTopRight | fadeOutTopRight | fadeInUp | fadeOutUp | fadeInUpBig | fadeOutUpBig


| SlidingEntrances | SlidingExits | ZoomingEntrances | ZoomingExits | |--------------------|----------------|--------------------|----------------| | slideInDown | slideOutDown | zoomIn | zoomOut | slideInLeft | slideOutLeft | zoomInDown | zoomOutDown | slideInRight | slideOutRight | zoomInLeft | zoomOutLeft | slideInUp | slideOutUp | zoomInRight | zoomOutRight | | | zoomInUp | zoomOutUp


Import multiple animations

import { AnimateStyled } from "animate-styled";
...
render(){
  return(
    <div>
      <AnimateStyled name="rollIn">
        <h1>My Content</h1>
      </AnimateStyled>
      <AnimateStyled name="zoomOut">
        <p>My Content</p>
      </AnimateStyled>
      <AnimateStyled name="slideOutUp">
        <img src="image/logo.png"/>
      </AnimateStyled>
    </div>
  )
}

Using All Properties


<AnimateStyled
  name="flip"
  duration="600ms"
  timingFunction="ease-in-out"
  delay="200ms"
  iterationCount={3}
  direction="alternate"
  fillMode="forwards"
  playState="running"
  transformOrigin="center top"
  backfaceVisibility="visible"
>
  {children}
</AnimateStyled>

Other uses

Nesting

<AnimateStyled name="flip">
  <AnimateStyled
    name="zoomOutUp"  
    iterationCount="infinite"
    timingFunction="ease-in">
    <h1>  Mundo</h1>
  </AnimateStyled>
</AnimateStyled>

License

AnimateStyled is licensed under the MIT license. (http://opensource.org/licenses/MIT)