Diagonal Split Image CTA
A bold, editorial call-to-action: two full-bleed images fill the section, divided by a diagonal seam via clip-path, each slowly panning in a slightly different direction on its own timer. A heading, description, and two buttons sit centered on top in a blurred card for legibility.
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/diagonal-split-image-cta.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta50.tsx instead.
Usage
The file also exports cta50Demo, 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 { Cta50, cta50Demo } from "@/components/blocks/cta/cta50"; export default function Page() { return <Cta50 {...cta50Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Two sides, one vision" | Heading inside the centered overlay card. |
| description | string | none | Supporting paragraph inside the overlay card. |
| primaryLabel | string | "Start a project" | Label for the primary button. |
| primaryHref | string | "#" | Href for the primary button. |
| secondaryLabel | string | "View our work" | Label for the secondary button. |
| secondaryHref | string | "#" | Href for the secondary button. |
| leftImage | MediaSlotImage | none | Image filling the left diagonal half. |
| rightImage | MediaSlotImage | none | Image filling the right diagonal half. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The diagonal seam is a `clip-path: polygon(...)` on each image's wrapping div (inline style, since Tailwind has no diagonal-clip utility for arbitrary custom angles); the two polygons share the same boundary points so there's no gap or overlap between halves.
- Each half's slow panning is a pure CSS @keyframes loop that alternates a scale+translate transform (`animation-direction: alternate` via the Tailwind arbitrary `_infinite_alternate` suffix), not JavaScript; the two halves use distinct keyframe names (cta50-pan-left/right) with slightly different durations and directions so the motion reads as independent. Both carry `motion-reduce:animate-none`.
- Images are pre-scaled (`scale(1.15)` baseline in the keyframes) so the panning translate never reveals an empty edge.
- Fully static Server Component: no event handlers, no client state.
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.