Bootstrap

API collapse

collapseHorizontalTransition

function

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.

Parameters
element

SSRHTMLElement

Element on which the transition should be applied.

direction

Whether the element should be shown or hidden.

"show" | "hide"

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.

Returns

void | Promise<void>


collapseVerticalTransition

function

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.

Parameters
element

SSRHTMLElement

Element on which the transition should be applied.

direction

Whether the element should be shown or hidden.

"show" | "hide"

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.

Returns

void | Promise<void>