Skip to content
nexubDesign System
v12.7.0

Components · Motion

Fade

StableAdded v0.0.1

Animates opacity between 0 and 1 based on the `in` prop.

import { Fade } from '@nexub/react';
View as Markdown

Playground

Props

Faded in content

TSX
<Fade in>…</Fade>

Examples

Default

Faded in content

Toggle

Animated content

Slow spring

Slow spring fade animation.

Props

Props
PropTypeDefaultDescription
inrequiredboolean—When true, fades content in. When false, fades it out.
duration'instant' | 'fast' | 'normal' | 'slow' | 'slower''normal'Controls the animation speed using the design token scale.
unmountOnExitbooleanfalseRemoves the element from the DOM after the exit animation completes.
asReact.ElementType<any, keyof React.JSX.IntrinsicElements>'div'The HTML element or component to render as the wrapper.
childrenReact.ReactNode—Content to animate.

On iOS & Android