Skip to content
UI

Search docs

Search components and documentation

New
Menu

Motion Scale

Zoom a mounting element in from 95% while it fades — the preconfigured scale preset, built on tw-animate-css with zero runtime dependencies.

Scale in

Zooms in from 95% on mount, then lifts on hover.

Installation

npx logic2b@latest add motion-scale

Usage

import { MotionScale } from "@/components/ui/motion-scale"

<MotionScale hover="lift">
  <Card>…</Card>
</MotionScale>

MotionScale is <Motion preset="scale"> — see Motion for the shared duration, delay, hover and asChild props, exit recipes and reduced-motion behavior.

API

Prop Type Default
duration number (ms) 500
delay number (ms) 0
hover lift | sink | scale | glow
asChild boolean false
…props React.ComponentProps<"div">