Skip to content
All blocks

[03] Marketing

Centered Hero

A news badge, a headline, two buttons and a product screen drawn with real components, all centered.

1280px

Copy the code

One file with one component and its sample data. It needs @vaneui/ui and its stylesheet, set up as in the installation guide.

hero-centered.tsx

import { Badge, Button, Card, Col, Container, NavLink, PageTitle, Row, Section, Text, Title } from "@vaneui/ui";
const stats = [
{ label: "Open tasks", value: "128" },
{ label: "Due this week", value: "24" },
{ label: "Shipped", value: "312" },
];
const tasks = [
{ name: "Billing page redesign", owner: "Ana Diaz", status: "In review", tone: { warning: true } },
{ name: "Search filters", owner: "Lee Park", status: "Shipped", tone: { success: true } },
{ name: "Mobile sign-in", owner: "Sam Ortiz", status: "In progress", tone: { info: true } },
];
function ArrowRight() {
return (
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d="M5 12h14M13 6l6 6-6 6" />
</svg>
);
}
/** A small product screen made of real components, so the hero shows the product and not a grey box */
function ProductPreview() {
return (
<Card noPadding overflowHidden shadow wFull className="max-w-5xl" aria-hidden="true">
<Row noGap itemsStretch>
<Col sm tabletHide borderR padding noShrink className="w-52">
<Text sm fontBold>Acme</Text>
<Col noGap>
{["Overview", "Projects", "Docs", "Team"].map((label) => (
<NavLink key={label} active={label === "Projects"} tabIndex={-1}>{label}</NavLink>
))}
</Col>
</Col>
<Col flex1 padding className="min-w-0">
<Row justifyBetween>
<Title>Projects</Title>
<Button filled tabIndex={-1}>New project</Button>
</Row>
<Row itemsStretch>
{stats.map((s) => (
<Card key={s.label} sm flex1 className="min-w-0">
<Text sm secondary>{s.label}</Text>
<Title className="tabular-nums">{s.value}</Title>
</Card>
))}
</Row>
<Col noGap>
{tasks.map((t) => (
<Row key={t.name} justifyBetween borderT paddingY>
<Text sm fontMedium>{t.name}</Text>
<Row sm>
<Text sm secondary mobileHide>{t.owner}</Text>
<Badge {...t.tone}>{t.status}</Badge>
</Row>
</Row>
))}
</Col>
</Col>
</Row>
</Card>
);
}
export function HeroCentered() {
return (
<Section lg>
<Container xl>
<Col lg itemsCenter className="max-w-3xl">
<Badge href="/changelog">New: shared workspaces <ArrowRight /></Badge>
<PageTitle textCenter className="text-balance">Plan, track and ship your team&apos;s work in one place</PageTitle>
<Text lg secondary textCenter className="text-balance">
Acme keeps projects, docs and decisions together, so nobody has to ask where things stand.
</Text>
<Row mobileStack mobileWFull>
<Button href="/signup" filled md mobileWFull>Start for free</Button>
<Button href="/demo" md mobileWFull>Book a demo</Button>
</Row>
<Text sm tertiary textCenter>Free for teams of up to 5. No credit card.</Text>
</Col>
<ProductPreview />
</Container>
</Section>
);
}

How it adapts

  • 1024px and up: the product screen shows a sidebar of links beside three stat cards and a task list.
  • Below 1024px: the screen drops its sidebar so the stats and tasks keep their room.
  • Below 768px: the buttons stack and fill the width, and the task owners hide.

How these props work is in responsive page sections without breakpoint classes.

Adapt it with your coding agent

Add the VaneUI MCP server, and your agent reads the component docs and prop tables while it changes the block: the copy, the sample data or the layout.

$ claude mcp add vaneui -- npx -y @vaneui/mcp

Setup for other editors is in the AI assistants guide.