Components · Motion
Slide
StableSince v0.0.1
Slides content in from a direction based on the `in` prop.
import { Slide } from '@nexub/react';Examples
Default
Directions
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| inrequired | boolean | — | When true, slides content in. When false, slides it out. |
| direction | 'up' | 'down' | 'left' | 'right' | 'up' | The direction from which the content slides in. |
| 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. |
| childrenrequired | React.ReactNode | — | Content to animate. |
On iOS & Android
Web only
Slide has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.