Staaarter

Study Abroad Hero

Hero section for a study-abroad program pitching a set of destination cards, each with a photo, city/country, and a program-duration badge, plus a row of key highlights and CTA buttons.

By Staaarter Team
Education
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/study-abroad-hero.json

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

Usage

The file also exports education9Demo, 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 { Education9, education9Demo } from "@/components/blocks/education/education9";

export default function Page() {
  return <Education9 {...education9Demo} />;
}

Props

PropTypeDefaultDescription
badge{ label: string; variant?: BadgeVariant }nonePill above the heading; only rendered when badge is truthy.
headingReactNodenoneHero heading.
descriptionstringundefinedSupporting copy under the heading.
highlightsHighlightItem[][]Icon + label row rendered below the destination cards.
destinationsDestinationCard[]noneDestination cards, each with a photo, city/country, and duration badge.
buttonsButtonItem[][]CTA buttons under the heading.
classNamestringnoneExtra classes for the outer section element.

Types

type HighlightItem = { icon: LucideIcon; label: string };

type DestinationCard = {
  city: string;
  country: string;
  duration: string;
  image: { src: string; alt: string };
};

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

Behavior notes

  • Purely presentational: there is no client state, no carousel, and no filtering. Every destination card and highlight renders unconditionally from props.
  • The duration badge is absolutely positioned over the top-left corner of each destination photo.
  • The destinations grid is a fixed responsive 1/2/4-column layout regardless of item count; 3 items leaves a gap in the last row on large screens rather than reflowing to 3 columns.
  • Each highlight's icon is passed directly as a prop (a LucideIcon component reference) since this is a Server Component with no client boundary to cross.
  • CTA buttons render as real next/link anchors via Button's render prop when href is set, but they don't perform any real navigation logic beyond that.