Hero
heroA marketing hero with an eyebrow, a headline, a supporting paragraph, two calls to action and a frame for a real product screenshot. Every part is composed by you, so the section carries your copy instead of a placeholder.
hero.demo.tsx
import { ArrowRight } from "lucide-react";
import { Badge } from "@/components/forme/badge/badge";
import { Button } from "@/components/forme/button/button";
import { Hero, HeroActions, HeroDescription, HeroEyebrow, HeroTitle, HeroVisual } from "@/components/forme/blocks/hero/hero";
const deployments = [
{ name: "web", version: "2.4.0", state: "Live", when: "4 minutes ago" },
{ name: "api", version: "2.3.9", state: "Live", when: "2 hours ago" },
{ name: "worker", version: "1.0.2", state: "Staged", when: "Yesterday" },
];
export function HeroDemo() {
return (
<div className="flex flex-col gap-16">
<Hero>
<HeroEyebrow>Now in public beta</HeroEyebrow>
<HeroTitle>The component library you own, not the one you rent.</HeroTitle>
<HeroDescription>
Forme components are copied into your project as plain source. Edit the token, rewrite the
part that does not fit, and keep the change for as long as you like.
</HeroDescription>
<HeroActions>
<Button asChild>
<a href="https://formeui.com">
Get started
<ArrowRight />
</a>
</Button>
<Button asChild variant="secondary">
<a href="https://formeui.com/components">Browse components</a>
</Button>
</HeroActions>
<HeroVisual>
<div className="flex items-center justify-between gap-4 border-b border-border px-4 py-3">
<p className="text-body-medium">Deployments</p>
<Badge variant="success">
<span className="size-1.5 rounded-full bg-success" aria-hidden="true" />
All systems operational
</Badge>
</div>
<ul className="divide-y divide-border">
{deployments.map((deployment) => (
<li
key={deployment.name}
className="flex items-center justify-between gap-4 px-4 py-3 text-body-regular"
>
<span className="font-mono text-caption-1-regular">
{deployment.name}
<span className="ms-2 text-muted-foreground">v{deployment.version}</span>
</span>
<span className="flex items-center gap-3">
<Badge size="sm" variant={deployment.state === "Live" ? "brand" : "neutral"}>
{deployment.state}
</Badge>
<span className="hidden text-caption-1-regular text-muted-foreground sm:inline">
{deployment.when}
</span>
</span>
</li>
))}
</ul>
</HeroVisual>
</Hero>
</div>
);
}Install
$npxshadcnadd@forme/hero
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Parts
HeroTakes<section>attributesHeroEyebrowTakes<p>attributesHeroTitleTakes<h1>attributesHeroDescriptionTakes<p>attributesHeroActionsTakes<div>attributesHeroVisualTakes<div>attributes