Configuration options for the collapse transition.
optional
animationPendingClasses:string
[]
the list of classes to add to the collapsable element while transitioning
optional
dimension:"height"
|"width"
the direction in which the collapsing is performed
optional
hideClasses:string
[]
the list of classes to add to the collapsable element when collapsed
optional
showClasses:string
[]
the list of classes to add to the collapsable element when shown
Represents the context for a collapsible element.
optional
maxSize:string
the maximum size of the collapseable content.
optional
minSize:string
the minimum size of the collapseable content
collapseHorizontalTransition(
element
,direction
,animated
,signal
,context
):void
|Promise
<void
>
A transition function for collapsing elements horizontally.
This function is created using the createCollapseTransition
utility
and is configured with horizontalConfig
.
• element: SSRHTMLElement
Element on which the transition should be applied.
• direction: "show"
| "hide"
Whether the element should be shown or hidden.
• animated: boolean
Whether the transition should be animated.
• signal: AbortSignal
Signal allowing to stop the transition while running.
• context: object
Context of the current transition. It is reused between calls if the previous transition was stopped while running on the same element.
void
| Promise
<void
>
collapseVerticalTransition(
element
,direction
,animated
,signal
,context
):void
|Promise
<void
>
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.
• element: SSRHTMLElement
Element on which the transition should be applied.
• direction: "show"
| "hide"
Whether the element should be shown or hidden.
• animated: boolean
Whether the transition should be animated.
• signal: AbortSignal
Signal allowing to stop the transition while running.
• context: object
Context of the current transition. It is reused between calls if the previous transition was stopped while running on the same element.
void
| Promise
<void
>
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.
• config: CollapseConfig
= {}
the collapse config
the collapse transition