Bootstrap

API cssTransitions

createCSSTransition

function

createCSSTransition(start): TransitionFn

Create a simple css transition.

Parameters
start

CSSTransitionFn

a function that creates the css animation and returns a clean-up function

Returns

TransitionFn

the css transition


CSSTransitionFn

type alias

CSSTransitionFn: (element, direction, animated, context) => void | () => void

Defines a function type for CSS transitions.

Parameters
element

SSRHTMLElement

direction

"show" | "hide"

animated

boolean

context

object

Returns

void | () => void


getTransitionDurationMs

function

getTransitionDurationMs(element): number

Retrieve the transition duration of the provided html element in milli seconds

Parameters
element

HTMLElement

the html element

Returns

number

transition duration in milli seconds


hasTransition

function

hasTransition(element): boolean

Check if the provided html element has a transition

Parameters
element

HTMLElement

the html element

Returns

boolean

true if the element has a transition