Skip to content
This repository has been archived by the owner. It is now read-only.
Wrapper component around React Motion for easier UI transitions
JavaScript CSS HTML
Branch: master
Clone or download

Latest commit

Latest commit f826fc8 Apr 18, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.
example remove auto height 😢 Oct 13, 2016
src Use prop-types package Jun 2, 2017
.babelrc updated dev deps Oct 14, 2016
.gitignore cleanup ignored files Oct 13, 2016 0.10.3 release Jun 25, 2017
LICENSE use MIT license Jul 21, 2016 ☢️ Apr 18, 2018
package.json 0.10.3 release Jun 25, 2017
webpack.banner.js add banner to dist build Dec 1, 2016
webpack.config.js updated dev deps Oct 14, 2016 add banner to dist build Dec 1, 2016


Please use react-spring for all of your animation needs.

React Motion UI Pack

npm version Dependency Status CDNJS

React Motion is an amazing animation library for React. React Motion UI Pack tries to help ease entry level / common use cases with React Motion by providing a higher level way to work with it and create common UI transitions easier. If you need more complex animations I suggest using React Motion directly.


yarn add react-motion-ui-pack

npm install react-motion-ui-pack --save

<script src=""></script>
(UMD library exposed as `Transition`)


import Transition from 'react-motion-ui-pack'

// Animate a list of items as they are added
    opacity: 1,
    opacity: 0,
  { =>
      <li key={}>{item.content}</li>

// Animate a modal
  component={false} // don't use a wrapping component
    opacity: 1,
    translateY: spring(0, {stiffness: 400, damping: 10})
    opacity: 0,
    translateY: 250
  { this.state.modalOpen &&
    <div key="modal" className="modal__content">
      // modal code


component: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, isElement])

Define the wrapping tag/component around the children passed in, pass false to not use a wrapping component at all for only child components.

runOnMount: PropTypes.bool

Determines whether the animation runs on mount or not

appear: PropTypes.object

Where the animation starts, defaults to leave value if nothing passed

enter: PropTypes.object

The resting state of the animation

leave: PropTypes.object

The ending value of the animation

onEnter: PropTypes.func

Callback right before an element enters, passes in your current animating values onEnter={currentValues => /* do something */} called only once.

onLeave: PropTypes.func

Same as onEnter, but fires multiple times as an element is leaving.


How appear, enter, & leave work

These values are automatically wrapped in a React Motion spring to keep the API simple. If you need a custom config you can pass your own spring e.g. spring(22, { stiffness: 30, damping: 300 }).

My animation values aren't being applied to any elements

If you decide to use a custom component as a child, style and dimensions props will be passed into that component for you to use however you want. If you pass a regular React DOM element, <Transition/> will take care of applying the values for you by cloning your element and passing it in.

Running Locally

clone repo

git clone

move into folder

cd ~/react-motion-ui-pack

install dependencies

npm install

run dev mode

npm run dev

open your browser and visit: http://localhost:8080/

You can’t perform that action at this time.