|HTML tag or React Component to render the component as.|
|Content to expand/collapse.|
|Additional CSS classes.|
|If true,the content will be hidden.|
|Used to determine the transition property.|
|HTML tag or React Component to finally render the component as.|
|Maximum height/width to expand to. Expanded state will expanded up until, but not beyond, the natural height/width of the element.|
|Minimum height/width to collapse to. This will set the starting collapsed size as well.|
|If true, removes the component from the real DOM when collapsed. For full virtual DOM unmount(if necessary), perform at a parent level.|
|Callback fired after content collapsed.|
|Callback fired after content expanded.|
|Callback fired before content collapsed.|
|Callback fired before content expanded.|
|Determine the speed of animation. This value comes from |
The ExpandCollapse component can be wrapped around any content that should be hidden or shown depending on state. When the component is collapsed, its children will be hidden and the surrounding content will pull in to fill the empty space. If you would like to expand and collapse content without pushing and pulling the surrounding elements, try using the Drawer component.
For more information on how to use the features and props for this component, check out the developer documentation.
The ExpandCollapse component can be opened along either dimension (height or width) by setting the dimension prop. In addition, min and max props are provided to control the limits on how far the component may expand or collapse.
You can control how quickly the component expands and collapses by by passing a CSS time value to transitionSpeed, which is a string containing any positive number directly followed by 's' or 'ms'. If you would like no transition, pass 0 the to transitionSpeed prop. Callback functions are provided to allow for event handling before and after the component expands and collapses.