Transition
Transition is a container element used for transitioning child components.
The base of the component was provided by Adam Watham from Tailwind in a GitHub Gist.
Import
Usage
Editable Example
Staggered
Editable Example
Child Transition components
The value of show
will flow down the tree to child components to make chaining animations easier.
Props
The Transition component has the following props.
Name | Type | Default | Description |
---|---|---|---|
show | boolean | Show the transition. | |
enter | TransitionStyleProps , Array<TransitionStyleProps> | Properties to set before the transition in begins. | |
enterFrom | TransformStyleProps , Array<TransformStyleProps> | Properties to set at the beginning of transitioning in. | |
enterTo | TransformStyleProps , Array<TransformStyleProps> | Properties to transition in to. | |
leave | TransitionStyleProps , Array<TransitionStyleProps> | Properties to set before the transition out begins. | |
leaveFrom | TransformStyleProps , Array<TransformStyleProps> | Properties to set at the beginning of transitioning out. | |
leaveTo | TransformStyleProps , Array<TransformStyleProps> | Properties to transition out to. | |
appear | boolean | Transition on show. | |
children | React.ReactNode | Properties to set before the transition begins. |