Skip to content
nexubDesign System
v12.7.0

Components · Motion

Slide

StableAdded v0.0.1

Slides content in from a direction based on the `in` prop.

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

Playground

Props

direction

Slid in from bottom

TSX
<Slide in>…</Slide>

Examples

Default

Slid in from bottom

Directions

Sliding content

Props

Props
PropTypeDefaultDescription
inrequiredboolean—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.
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.
distancestring'12px'Distance of the slide offset.

On iOS & Android