animateEnterExit

open fun SwingModifier.animateEnterExit(enter: EnterTransition = fadeIn(), exit: ExitTransition = fadeOut(), label: String = "animateEnterExit"): SwingModifier

Gives this component its own enter and exit, running on transition and combined with the container's. The container stays mounted until this component has finished animating too.

The component's parent must be a Foundation layout, and the component must paint through a decoration, as a Box, Row, Column or custom Layout does. Pass EnterTransition.None and ExitTransition.None to the container to animate only the components that declare this.

Return

this modifier with the enter and exit declared on it.

Parameters

enter

how the component appears; a fade in by default.

exit

how the component disappears; a fade out by default.

label

prefixes the name of every animation this modifier registers.

Throws

when the modifier is applied under another parent or to a component that paints through no decoration.