3D Tilt Card CTA
A photo-backed call-to-action card that tilts in 3D perspective as the cursor moves across it, zooms its background image slightly on hover, and sweeps a diagonal shine of light across the surface. Great for a single, high-impact conversion moment.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/3d-tilt-card-cta.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta45.tsx instead.
Usage
The file also exports cta45Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Cta45, cta45Demo } from "@/components/blocks/cta/cta45"; export default function Page() { return <Cta45 {...cta45Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "See it in action" | Heading overlaid on the card. |
| description | string | "A card that responds to how you look at it..." | Supporting copy under the heading. |
| primaryLabel | string | "Explore the demo" | Call-to-action button label. |
| primaryHref | string | "#" | Link target for the call-to-action button. |
| image | { src: string; alt: string } | none | Background photo. Falls back to a placeholder when omitted. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The 3D tilt is a real, mouse-driven effect: an onMouseMove handler computes the cursor's position relative to the card's bounding box and derives rotateX/rotateY (up to ±8deg), applied via an inline perspective/rotate transform. onMouseLeave resets the tilt back to flat.
- The background image's zoom-on-hover (group-hover:scale-105) and the diagonal shine sweep (a pure-CSS @keyframes animation triggered by :hover) are both decorative: neither responds to cursor position, only to whether the pointer is anywhere over the card.
- The call-to-action button is decorative: it renders as a real Next.js Link via the button's render prop, but defaults to "#" and doesn't perform a real navigation of its own.
More CTA Blocks
View all →centered-newsletter-cta
Centered Newsletter CTA
Minimal centered call-to-action with heading, description, and action buttons.
split-layout-newsletter-cta
Split Layout Newsletter CTA
Two-column call-to-action with a decorative image on one side and a feature list plus subscribe form on the other.
newsletter-social-proof-cta
Newsletter CTA with Social Proof
Newsletter call-to-action with an avatar stack, subscriber count, and a testimonial quote.
banner-cta
Banner CTA
Horizontal banner call-to-action with heading and action buttons side by side.
stats-cta
Stats CTA
Call-to-action section with impressive statistics and trust indicators above action buttons.
multi-card-cta
Multi-Card CTA
Three action cards side by side, each offering a different path to conversion.