Skip to content

Component: Transition

TryHardDood edited this page Jan 8, 2021 · 1 revision

Transition

The Transition component lets you add enter/leave transitions to conditionally rendered elements, using CSS classes to control the actual transition styles in the different stages of the transition.

View live demo

Markup:

<transition
    enter="transition-opacity duration-75"
    enterFrom="opacity-0"
    enterTo="opacity-100"
    leave="transition-opacity duration-150"
    leaveFrom="opacity-100"
    leaveTo="opacity-0">
    <span>I will fade in and out</span>
</transition>

Examples

Clone this wiki locally