← All components
Cinematic Image
ImageCinematic 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.jsonPrerequisiteInstall the provider base first
This component imports from @/lib/motion and needs <MotionProvider> mounted in your root layout — install the base once, before copying this component.
npx shadcn add https://motion.asmitsah.dev/r/provider.jsonStep 1Install the runtime dependency
npm install motionStep 2Copy the source into
components/motion/cinematic-image.tsxcomponents/motion/cinematic-image.tsx
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.
Full-bleed hero
Large, single-focal images only — this is a deliberate scale-DOWN settle (110% → 100%), never applied to titles or text.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | The large image (or media) that scales down into place. |
| className | string | — | Passed straight through — CinematicImage becomes your layout element. Must NOT set overflow-hidden itself; that belongs on a parent frame. |
| style | CSSProperties | — | Inline style passthrough. |