nkbt / react-collapse

Component-wrapper for collapse animation with react-motion for elements with variable (and dynamic) height
MIT License
1.13k stars 113 forks source link

Set animation duration #183

Closed vivekiyer114 closed 7 years ago

vivekiyer114 commented 7 years ago

how to set animation duration in this ?

nkbt commented 7 years ago

Spring animation does not operate time. You can play with spring stiffness, so it is faster or slower, but you cannot configure animation to have specific duration. Play with stiffness/dumping in example 5 http://nkbt.github.io/react-collapse/example/

vivekiyer114 commented 7 years ago

Where is the code for setting stiffness ? I am not able to find it on your doc. Please Help me out with a link ! Thank you very much !

nkbt commented 7 years ago

It is in README

https://github.com/nkbt/react-collapse#springconfig-proptypesobjectofproptypesnumber