Staaarter

Fullwidth Image CTA

A bold, visually striking conversion section: a full-bleed background photo sits under a dark gradient overlay, with a large heading, short paragraph, and primary/secondary buttons in light text bottom-aligned on top. Perfect for a dramatic close to a landing page.

By Staaarter Team
CTA
Docs
Live preview

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/fullwidth-image-cta.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta18.tsx instead.

Usage

The file also exports cta18Demo, 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 { Cta18, cta18Demo } from "@/components/blocks/cta/cta18";

export default function Page() {
  return <Cta18 {...cta18Demo} />;
}

Props

PropTypeDefaultDescription
headingstringnoneMain call-to-action heading, shown in light text over the image.
descriptionstringnoneSupporting paragraph under the heading.
imageMediaSlotImagenoneFull-bleed background photo.
primaryLabelstring"Start building"Label for the primary button.
primaryHrefstring"/signup"Link for the primary button.
secondaryLabelstring"See how it works"Label for the secondary button.
secondaryHrefstring"/product"Link for the secondary button.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • Fully static: the overlay (`bg-gradient-to-t from-black/70 to-black/20`) and text colors are fixed for legibility over any photo; both buttons are real links but point at placeholder routes.
  • MediaSlot sits inside an aspect-ratio wrapper per this repo's Safari height-collapse convention, and falls back to a decorative placeholder if no image is supplied.