Giter Site home page Giter Site logo

platane / react-flippity Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 240 KB

Animate a list of elements using FLIP trick.

Home Page: http://Platane.github.io/react-flippity

JavaScript 95.57% Shell 4.43%
react flip-animation animation spring-physics

react-flippity's Introduction

react-flippity

moss it crowd

You think it's a flippin' game?

Animate a list of elements using FLIP trick.

demo

Usage

TODO publish to npm

same API as the brilliant react-motion-flip

<div>

 <Flippity>

  () =>
   items.map( item =>  <MyItemComponent key={item.key} {...x} />

 </Flippity>

</div>

For every change in the items list, Flippity will make a nice transition to the new layout.

Styling

The previous code will produce this markup:

<div>

  <div> <!-- the flippity container -->

   <div> <MyItemComponent /> </div>  <!-- one wrapper around each item -->
   <div> <MyItemComponent /> </div>
   <div> <MyItemComponent /> </div>

 </div>  

</div>

You might want to custom the style of the container or the item wrapper.

This can be achieved by passing style, childStyle and className, childClassName.

Spring physic

The physic spring can be customized with the props stiffness, damping and precision.

References

TODO

  • [v] publish to npm
  • [v] animate width and height
  • compute acceleration based on actual time ( not number of frame )
  • test ๐Ÿ 
  • animate with webAnimation API

react-flippity's People

Contributors

platane avatar

Stargazers

 avatar  avatar

Watchers

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