Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

itsdouges/element-motion

Repository files navigation

yubaba 🧙✨

/juːba:ba/ out of the box animated experiences for React.js 🧙✨

npm npm bundle size (minified + gzip)

Moving from a persisted element Moving to another distinct element Moving using a focal target

What is yubaba???

It's all about ✨animation over state transitions ✨it can help with:

Installation

yubaba has a peer dependency on emotion for some of the more advanced animations.

npm install yubaba react@^16.4.x react-dom@^16.4.x emotion@^10.x.x --save

or

yarn add yubaba react@^16.4.x react-dom@^16.4.x emotion@^10.x.x

Function as children is a common pattern here. The most basic usage could animate an element between small and large states.

import Baba, { Move } from 'yubaba';

({ isLarge }) => (
  <Baba name="my-first-baba" key={isLarge}>
    <Move>{baba => <div {...baba} className={isLarge ? 'large' : 'small'} />}</Move>
  </Baba>
);

Next steps

About

Tween between view states with declarative zero configuration element motions for React

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors