blaze-motion
← All components

Cinematic Image

Image

Cinematic scale-down settle (110% → 100%) for large images in an overflow-hidden frame.

hero.jpg
detail.jpg

Installation

One command drops the source into your repo — editable, with the provider and motion pulled in automatically.

npx shadcn add https://motion.asmitsah.dev/r/cinematic-image.json

Usage

Basic

The wrapper (or a parent) must be overflow-hidden — the 1.1 scale is clipped there, never left to overflow and shift layout.

import { CinematicImage } from "@/components/motion/cinematic-image";
import Image from "next/image";

<div className="overflow-hidden rounded-sm">
  <CinematicImage>
    <Image src="/hero.jpg" alt="" width={1600} height={900} className="h-full w-full object-cover" />
  </CinematicImage>
</div>

Full-bleed hero

Large, single-focal images only — this is a deliberate scale-DOWN settle (110% → 100%), never applied to titles or text.

<div className="overflow-hidden">
  <CinematicImage className="h-[70vh] w-full">
    <Image src="/cover.jpg" alt="" fill className="object-cover" />
  </CinematicImage>
</div>

Props

PropTypeDefaultDescription
childrenReactNodeThe large image (or media) that scales down into place.
classNamestringPassed straight through — CinematicImage becomes your layout element. Must NOT set overflow-hidden itself; that belongs on a parent frame.
styleCSSPropertiesInline style passthrough.