Skip to content

Zoom Card

Media frame whose content zooms slowly on hover, with an optional caption.

From the Nitip template — see it in context

Installation

$ npx shadcn@latest add https://framebrick.co/r/zoom-card.json

Usage

import { ZoomCard } from "@/components/ui/zoom-card";

<ZoomCard href="/work/aurora" caption="Aurora — brand site" cursor="View project" className="aspect-[4/3]">
  <Image src={cover} alt="" fill className="object-cover" />
</ZoomCard>

Props

PropTypeDefaultDescription
childrenReactNode—The media: an image, a video, anything. It is stretched to the frame and clipped.
hrefstring—Makes the whole card a Next.js link.
captionReactNode—Shown over the bottom of the frame on a gradient.
zoomnumber1.05Scale at the end of the hover.
cursorstring—Label for <LabelCursor /> (sets data-cursor).
  • The zoom uses Framer's own tween — cubic-bezier(0.12, 0.23, 0.5, 1) over 400 ms — not a spring.
  • Keyboard focus zooms too; reduced motion turns the transition off.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this component in your own project.

Create a React + Tailwind CSS component called ZoomCard (no animation library needed).
- A rounded-lg frame with overflow-hidden and bg-muted that stretches its children to fill it.
- On hover or keyboard focus of the frame, the inner layer scales to 1.05 with transition-transform,
  duration 400ms and Framer's tween cubic-bezier(0.12, 0.23, 0.5, 1); motion-reduce turns the transition off.
- Optional caption absolutely positioned across the bottom on a gradient from black/70 to transparent,
  p-4, text-sm font-medium text-white, pointer-events-none.
- If an href is given, the frame is a Next.js Link with a visible focus ring; a "cursor" prop sets data-cursor
  for a custom cursor component.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy