Welcome card for a dashboard surface. Auto-formats today's date in the viewer's timezone, greets the user by name, and surfaces actions plus a stats row.
Three concepts are ready for your review on Summer at the Movies. Your Squad has been busy.
npx shadcn@latest add https://sdk-components.thesqd.com/r/dashboard-hero.jsonimport { DashboardHero } from "@/components/blocks/dashboard-hero";import { ArrowRight, Plus } from "@phosphor-icons/react/ssr";
import { DashboardHero } from "@/components/blocks/dashboard-hero";
export function DashboardPage() {
return (
<DashboardHero
name="Sarah"
subheader="Three concepts are ready for your review on Summer at the Movies."
actions={[
{ label: "Review concepts", icon: <ArrowRight />, onClick: () => {} },
{ label: "New request", icon: <Plus />, variant: "ghost", onClick: () => {} },
]}
stats={[
{ value: "5", label: "Active" },
{ value: "1", label: "Queued" },
{ value: "1", label: "Delivered this month" },
{ value: "2", label: "Awaiting your approval" },
]}
/>
);
}DashboardHero — purple hero card (auto date + greeting)
├── eyebrow — auto-calculated date in viewer's timezone
├── headline — "{greeting}, {name}." with name in coral italic
├── subheader — supporting paragraph (ReactNode)
├── actions[] — { label, icon?, onClick?, variant?: "primary" | "ghost" }
└── stats[] — { value, label } rendered as an uppercase chip rowThree concepts are ready for your review on Summer at the Movies. Your Squad has been busy.
Three concepts are ready for your review on Summer at the Movies.
DashboardHero
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | — | First name. Rendered in coral italic in the greeting. |
greeting | string | auto | Overrides the "Good morning / afternoon / evening" prefix derived from local hour. |
subheader | React.ReactNode | — | Paragraph below the headline. |
actions | DashboardHeroAction[] | — | Action buttons rendered as a row of pills. |
stats | DashboardHeroStat[] | — | Uppercase stat chips rendered at the bottom. |
date | string | auto | Overrides the auto-formatted date eyebrow. |
locale | string | browser | BCP-47 locale used to format the auto date. |
className | string | — | Extra classes merged onto the outer section. |
DashboardHeroAction
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Button label. Rendered uppercase + tracked. |
icon | React.ReactNode | — | Optional lucide icon. Auto-tagged with data-icon for spacing. |
onClick | () => void | — | Click handler. |
variant | "primary" | "ghost" | "primary" | Coral filled pill or transparent white-bordered pill. |
iconPosition | "start" | "end" | primary: "end", ghost: "start" | Where to render the icon relative to the label. |
DashboardHeroStat
| Prop | Type | Default | Description |
|---|---|---|---|
value | React.ReactNode | — | Bold white value (e.g. a number). |
label | string | — | Uppercase muted label after the value. |