Skip to content
nexubDesign System
v12.7.0

Components · Motion

Scale

StableAdded v0.0.1

Scales content in/out from its center.

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

Playground

Props

Scaled content

TSX
<Scale in>…</Scale>

Examples

Default

Scaled content

Toggle

Scaling content

Props

Props
PropTypeDefaultDescription
inrequiredboolean—When true, scales content in from 0 to 1. When false, scales it back down to 0.
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.
initialScalenumber0.95The scale value at the start/end of the animation (when in={false}).

On iOS & Android