Configuration options for the collapse transition.
optionalanimationPendingClasses:string[]
the list of classes to add to the collapsable element while transitioning
optionaldimension:"height"|"width"
the direction in which the collapsing is performed
optionalhideClasses:string[]
the list of classes to add to the collapsable element when collapsed
optionalshowClasses:string[]
the list of classes to add to the collapsable element when shown
Represents the context for a collapsible element.
optionalmaxSize:string
the maximum size of the collapseable content.
optionalminSize:string
the minimum size of the collapseable content
constcollapseHorizontalTransition:TransitionFn
A transition function for collapsing elements horizontally.
This function is created using the createCollapseTransition utility
and is configured with horizontalConfig.
constcollapseVerticalTransition:TransitionFn
A transition function that handles vertical collapse animations.
This function is created using the createCollapseTransition utility with
a vertical configuration. It is intended to be used for animating the
collapsing and expanding of vertical elements.
createCollapseTransition(
config):TransitionFn
Create a collapse transition.
The transition attaches / removes classes during the different states of the collapse transition. It also updates the dimension value when reaching a non-pending state.
CollapseConfig = {}
the collapse config
the collapse transition