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

Tip - Both es and commonjs modules are provided in the package. Make sure to consume the es modules for their tree shaking ability!

Usage

import Animator, { Move } from 'yubaba';

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

Next steps

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors