jossmac / react-view-transition

🎟 Animate views as they mount/unmout

Home Page:https://jossmac.github.io/react-view-transition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React View Transition

Animate views as they mount/unmount.

https://jossmac.github.io/react-view-transition

import TransitionProvider from 'react-view-transition';

const Slider = ({ views }) => (
  <TransitionProvider>
    {views.map(v => <div key={v.key}>{v.label}</div>)}
  </TransitionProvider>
);
Slider.defaultProps = {
  views: [
    { key: 'first', label: 'First View' },
    { key: 'second', label: 'Second View' },
    { key: 'third', label: 'Third View' },
  ],
};

Alternatives

This component is intentionally simple. For more a sophisticated alternative checkout:

About

🎟 Animate views as they mount/unmout

https://jossmac.github.io/react-view-transition

License:MIT License


Languages

Language:JavaScript 100.0%