0.1.2 • Published 7 years ago

react-leave-motion v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Overview

要素を削除したときにアニメーションするためのコンポーネントです。

Demo

demo
src

API

Exports

  • spring
  • presets
  • LeaveMotion
  • LeaveMotionItem
  • LeaveTween
  • LeaveTweenItem
  • LeaveTransitionGroup

\

Usage

<LeaveMotion itemKey="1" defaultStyle={{x: 0}} style={{x: spring(10)}}>
  {interpolatingStyle => <div style={interpolatingStyle} />}
</LeaveMotion>

\

Usage

<LeaveTween itemKey="1" defaultStyle={{x: 0}} style={{x: 10}}>
  {interpolatingStyle => <div style={interpolatingStyle} />}
</LeaveTween>

bug

要素が消えきる前に同じkeyを追加するとバグりますが、 直す予定は特にありません。