Here is an example https://codepen.io/zackbrown/pen/yxKRab 

Note you can set states with an easing curve, giving you the ability to create programmatic animations (such as in this example — right-click > fork it if you want to see how it works).

Did this answer your question?