Skip to content

Hero

Hero Video

A centered label pill, heading, lead and two buttons above a wide video that loads and plays on click.

Layout and motion from the Findit template — see it in context

Installation

$ npx shadcn@latest add https://framebrick.co/r/blocks/hero-video.json

Usage

import { HeroVideo } from "@/components/hero-video";

<HeroVideo
  label="Your trusted partner in real estate"
  title="Your next home is one visit away"
  actions={[
    { label: "Explore properties", href: "/properties" },
    { label: "Book a visit", href: "/contact" },
  ]}
  video={{ src: "/video/tour.mp4", poster: "/video/tour.jpg", label: "Play the property tour video" }}
/>

Props

PropTypeDefaultDescription
as"h1" | "h2""h1"Heading level — h1 when the hero opens the page.
labelstring—Short line in the pill above the heading, beside a star in the primary color.
title / leadstring—Heading (text-display) and a muted lead under it.
actions{ label, href }[]—Up to two buttons: filled, then outlined.
video{ src, poster, label }—An MP4 (or WebM) file, the still shown until it plays, and what the play button says.
classNamestring—Classes for the <section>.
  • Nothing of the video loads until it is played (preload none); the whole frame is the play button. The round button sits at 75% and comes to full on hover (hero-video, spring bounce 0, 0.4s); it comes back when the video is paused or ends.
  • 16:9 below 1024px, 550px tall from 1024px. The section fades from the muted surface to the background over its last quarter.
  • Installs as components/hero-video.tsx, beside the player it uses (components/ui/hero-video.tsx, imported as Video).
  • The demo clip is a free Pexels video streamed from Pexels; host your own file for production.

AI prompt

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

Create a React + Tailwind CSS block called HeroVideo (Next.js).
- <section> with a vertical gradient from muted/50 (to 75%) to the background, py-(--section-y); container mx-auto max-w-(--container) px-(--gutter),
  a centered column (gap-16, md:gap-20, lg:gap-24).
- Text column, centered, max 350px / 500px (768px) / 750px (1024px), gap-7.5: a pill (rounded-full, border, bg-card, shadow-xs, text-sm, py-1 pl-1
  pr-4) with a 24px primary circle holding a star; the h1 (font-heading text-display semibold, tracking-tight, balanced); a muted lead
  (text-lead, max 500px); two buttons (lg): filled and outline, whose label rolls up while a copy rises from below (spring bounce 0, 0.4s).
- Below: a 16:9 video frame (rounded-xl, lg: 550px tall) that is one <button>: a <video preload="none" muted loop playsInline> with a poster, and a
  48px round play button (bg-black/25, backdrop blur, white triangle) at 75% opacity, 100% on hover and focus (spring bounce 0, 0.4s); click
  toggles play/pause; the play button shows while paused.
- Only shadcn variables and block tokens.

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