Motion

ScaleIn

Opacity + scale 0.96→1 on entrance, `easing.standard`. The subtle, non-overshoot alternative to PopIn — for cards and panels entering the layout.

Preview

Scales in from 0.96

Code

src/components/motion/ScaleIn.tsx
"use client";

import { motion, useReducedMotion, type HTMLMotionProps } from "framer-motion";
import { scaleIn, reducedFade } from "@/lib/motion";

/**
 * ScaleIn — opacity + scale 0.96→1, `easing.standard`. The subtle,
 * non-overshoot alternative to PopIn for cards/panels entering the layout.
 */
export function ScaleIn(props: HTMLMotionProps<"div">) {
  const reduced = useReducedMotion();
  return <motion.div variants={reduced ? reducedFade : scaleIn} {...props} />;
}

Installation

Usage
import { ScaleIn } from "@/components/motion/ScaleIn";

<ScaleIn initial="hidden" animate="show">
  <WindowCard>...</WindowCard>
</ScaleIn>

Props

PropTypeDefaultDescription
...propsHTMLMotionProps<'div'>Any framer-motion div prop.

Accessibility

Same reduced-motion fallback as FadeUp.

web design.