Scale in
Zooms in from 95% on mount, then lifts on hover.
Installation
npx logic2b@next add motion-scaleUsage
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.
Live playground
Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.
Generated JSX
<MotionScale
duration={500}
delay={0}
>Scale reveal</MotionScale>Scale reveal
API reference
Generated from the public TypeScript exports in src/ui/motion-scale.tsx.
MotionScaleProps
Typetype MotionScaleProps = Omit<MotionProps, "preset">MotionScale
ComponentZoom a mounting element in from 95%. Preconfigured `<Motion preset="scale">`.
Props: MotionScalePropsAccessibility contract
Machine-readable behavior and consumer responsibilities for motion-scale.
- Support
- Composition contract
- Pattern
- scale animation
- Motion for React
Built-in semantics
- Preserves child semantics and accepts reduced-motion behavior from the motion foundation.
Consumer responsibilities
- Keep interactive hit targets stable and offer an instant reduced-motion alternative.
Known limitations
- • Large or rapid scale changes can be uncomfortable unless reduced-motion preferences are honored.