Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CSSTransitionClassNamesObject

An object of classnames that will be applied based on the TransitionStage where all the classes in the previous stages will also be applied.

example

Explaining className application

const { ref, className, stage, appearing } = useCSSTransition({
appear: true,
enter: true,
exit: true,
timeout: 300,
classNames: {
appear: "appear",
appearEnter: "appear--enter",
appearDone: "appear--done appear--complete",
enter: "enter",
enterEnter: "",
enterDone: "enter--done enter--complete",
exit: "",
exitEnter: "",
exitDone: "exit--done exit--complete",
}
});

// stage === "enter" && appearing
// className === "appear"
//
// stage === "entering" && appearing
// className === "appear appear--enter"
//
// stage === "entered" && appearing
// className === "appear--done appear--complete"
//
//
// stage === "enter" && !appearing
// className === "enter"
//
// stage === "entering" && !appearing
// className === "enter"
//
// stage === "entered" && !appearing
// className === "enter--done enter--complete"
//
//
// stage === "exit"
// className === ""
//
// stage === "exiting"
// className === ""
//
// stage === "exited"
// className === "exit--done exit--complete"
remarks

@since 4.0.0

Hierarchy

  • CSSTransitionClassNamesObject

Index

Properties

appear?: string

The class name to apply starting at the "enter" TransitionStage while TransitionState.appearing.

defaultvalue

""

appearActive?: string

The class name to apply starting at the "entering" TransitionStage while TransitionState.appearing.

defaultvalue

""

appearDone?: string

The class name to apply starting at the "entered" TransitionStage while TransitionState.appearing.

defaultvalue

""

enter?: string

The class name to apply starting at the "enter" TransitionStage

defaultvalue

""

enterActive?: string

The class name to apply starting at the "entering" TransitionStage

defaultvalue

""

enterDone?: string

The class name to apply starting at the "entered" TransitionStage

defaultvalue

""

exit?: string

The class name to apply starting at the "exit" TransitionStage

defaultvalue

""

exitActive?: string

The class name to apply starting at the "exiting" TransitionStage

defaultvalue

""

exitDone?: string

The class name to apply starting at the "exited" TransitionStage

defaultvalue

""

Generated using TypeDoc