Staaarter

Split Announcement Hero

Split hero with an image on one side and a short list of dated announcement links on the other. Perfect for release-driven landing pages that want recent updates above the fold.

By Staaarter Team
Hero
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge, button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/split-announcement-hero.json

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

Usage

The file also exports hero2Demo, 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 { Hero2, hero2Demo } from "@/components/blocks/hero/hero2";

export default function Page() {
  return <Hero2 {...hero2Demo} />;
}

Props

PropTypeDefaultDescription
badge{ label: string }nonePill above the heading; only rendered when set.
headingReactNodenoneMain headline.
descriptionstringundefinedSupporting subtext below the heading.
announcementsAnnouncementItem[][]Dated list items below the description.
buttonsButtonItem[][]CTA buttons below the announcement list.
imageMediaSlotImageundefinedImage filling the opposite column; falls back to a placeholder when omitted.
classNamestringnoneExtra classes for the outer section element.

Types

type AnnouncementItem = { title: string; date?: string; href?: string };

type ButtonItem = {
  label: string;
  href?: string;
  variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
};

Behavior notes

  • The image column always renders (real photo via MediaSlot's image prop, or its built-in placeholder icon when omitted) and stacks above the content column on mobile.
  • An announcement item only wraps in a Link (and gets hover affordance) when it has an href; without one it renders as a static, non-interactive row.
  • Badge, announcements, and buttons are each independently optional.