Comparisons
In this section we will make some comparisons with the most popular libraries in npm.
See the difference in how both components transition to the new height.
react-collapsible-content transitions smoothly, while others jumps directly to the new height.
How to import
import CollapsibleContent from 'react-collapsible-content';
rc-collapse
In rc-collapse transition is activated when onClick and deactivated when transition ends. That is why you don't see animations when content changes.
Content will change in: 5 seconds (refresh to restart).
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
react-collapse
In react-collapse height: auto; by default when it's expanded, that is why you don't see any transition after children changes. When it changes to collapsed height is set to 0px and when it changes to expanded height is set to the current height of the component (i.e.: 280px), and when transitions end height is set to auto again.
Note: transitions doesn't work when height is set to auto.
coming soon
react-collapsible
coming soon