Staaarter

Video Hero CTA

A full-bleed looping background video fills the section, with a dark gradient overlay fading from the bottom so heading, description, and buttons stay legible while anchored to the bottom edge of the hero.

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 dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/video-hero-cta.json

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

Usage

The file also exports cta49Demo, 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 { Cta49, cta49Demo } from "@/components/blocks/cta/cta49";

export default function Page() {
  return <Cta49 {...cta49Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringnoneSmall label above the heading.
headingstring"Build something people remember"Main headline.
descriptionstringnoneSupporting copy under the heading.
primaryLabelstring"Get started"Primary button label.
primaryHrefstring"#"Primary button destination.
secondaryLabelstring"Watch the film"Secondary button label, omit to hide the button.
secondaryHrefstring"#"Secondary button destination.
videoSrcstringnoneURL of the looping background video (MP4).
posterSrcstringnonePoster image shown before the video has loaded.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • The video autoplays muted and looped purely through native HTML attributes (`autoPlay loop muted playsInline`) — there is no JavaScript play/pause control in this demo.
  • A real integration should add a user-facing mute/pause control for accessibility (respecting prefers-reduced-motion and giving users a way to stop the motion); that is intentionally not implemented here.
  • Fully static: no client-side state, the gradient overlay and bottom-aligned content are pure CSS.