Components · Motion
Animates opacity between 0 and 1 based on the `in` prop.
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| in | boolean | — | ✓ | 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. |
| easing | 'linear' | 'in' | 'out' | 'in-out' | 'out-expo' | 'spring' | 'out' | — | Easing curve applied to the animation. |
| unmountOnExit | boolean | false | — | Removes the element from the DOM after the exit animation completes. |
| as | React.ElementType | 'div' | — | The HTML element or component to render as the wrapper. |
| children | React.ReactNode | — | ✓ | Content to animate. |
import { Fade } from '@nexub/react';