Hero 2: developer tool with install command
Centered hero for developer tools: headline, two actions, package-manager install tabs and a terminal window with a light beam tracing its border.
// Ballmac UI: Hero 2. https://ui.ballmac.com/blocks/hero-2
import * as React from "react"
import { ArrowRight } from "lucide-react"
import { BorderBeam } from "@/components/ballmac/border-beam"
import { buttonVariants } from "@/components/ballmac/button"
import { InstallTabs } from "@/components/ballmac/install-tabs"
import { Terminal, TerminalLine } from "@/components/ballmac/terminal"
import { TextReveal } from "@/components/ballmac/text-reveal"
import { cn } from "@/lib/utils"
type Hero2Props = Omit<React.ComponentProps<"section">, "title"> & {
/** Mono label above the headline. */
eyebrow?: string
/** The headline. */
title?: string
/** One or two sentences under the headline. */
description?: string
/** CLI command without the runner, shown in package-manager tabs. */
command?: string
/** Main call to action. */
primaryAction?: { label: string; href: string }
/** Secondary call to action. */
secondaryAction?: { label: string; href: string }
}
function Hero2({
eyebrow = "v2.0 · Open source",
title = "Install it once. Use it everywhere.",
description = "A developer tool that fits your stack in one command, with typed APIs, sensible defaults and nothing to configure on day one.",
command = "create-acme-app@latest my-app",
primaryAction = { label: "Read the docs", href: "#" },
secondaryAction = { label: "View on GitHub", href: "#" },
className,
...props
}: Hero2Props) {
return (
<section data-slot="hero-2" className={cn("relative isolate overflow-hidden", className)} {...props}>
<div
aria-hidden="true"
className="absolute inset-x-0 top-0 -z-10 h-[520px] bg-[radial-gradient(ellipse_60%_60%_at_50%_0%,color-mix(in_oklch,var(--ring)_18%,transparent),transparent_70%)]"
/>
<div className="mx-auto max-w-4xl px-4 pt-20 pb-16 text-center sm:px-6 md:pt-28">
<p className="font-mono text-xs tracking-[0.16em] text-muted-foreground uppercase">{eyebrow}</p>
<TextReveal as="h1" className="mt-5 text-4xl font-semibold tracking-[-0.04em] text-balance sm:text-6xl">
{title}
</TextReveal>
<p className="mx-auto mt-6 max-w-2xl text-lg leading-relaxed text-pretty text-muted-foreground">{description}</p>
<div className="mt-8 flex flex-wrap justify-center gap-3">
<a className={buttonVariants({ size: "lg", shape: "pill" })} href={primaryAction.href}>
{primaryAction.label} <ArrowRight className="rtl:rotate-180"/>
</a>
<a className={buttonVariants({ variant: "outline", size: "lg", shape: "pill" })} href={secondaryAction.href}>{secondaryAction.label}</a>
</div>
<InstallTabs command={command} className="mx-auto mt-10 max-w-lg text-start" />
</div>
<div className="mx-auto max-w-3xl px-4 pb-20 sm:px-6">
<div className="relative rounded-xl">
<Terminal title="~/projects" className="w-full">
<TerminalLine variant="command">npx {command}</TerminalLine>
<TerminalLine>Creating a new app in ./my-app</TerminalLine>
<TerminalLine>Installing dependencies…</TerminalLine>
<TerminalLine variant="success">Ready in 4.2s</TerminalLine>
<TerminalLine variant="comment"># cd my-app && npm run dev</TerminalLine>
</Terminal>
<BorderBeam duration={8} className="rounded-xl" />
</div>
</div>
</section>
)
}
export { Hero2, type Hero2Props }Installation
$ pnpm dlx shadcn@latest add @ballmac/hero-2Install the dependencies.
$ pnpm add lucide-reactAdd the Ballmac items it builds on.
$ pnpm dlx shadcn@latest add @ballmac/border-beam @ballmac/button @ballmac/install-tabs @ballmac/terminal @ballmac/text-revealCopy the source into your project.
components/ballmac/blocks/hero-2/hero-2.tsx// Ballmac UI: Hero 2. https://ui.ballmac.com/blocks/hero-2 import * as React from "react" import { ArrowRight } from "lucide-react" import { BorderBeam } from "@/components/ballmac/border-beam" import { buttonVariants } from "@/components/ballmac/button" import { InstallTabs } from "@/components/ballmac/install-tabs" import { Terminal, TerminalLine } from "@/components/ballmac/terminal" import { TextReveal } from "@/components/ballmac/text-reveal" import { cn } from "@/lib/utils" type Hero2Props = Omit<React.ComponentProps<"section">, "title"> & { /** Mono label above the headline. */ eyebrow?: string /** The headline. */ title?: string /** One or two sentences under the headline. */ description?: string /** CLI command without the runner, shown in package-manager tabs. */ command?: string /** Main call to action. */ primaryAction?: { label: string; href: string } /** Secondary call to action. */ secondaryAction?: { label: string; href: string } } function Hero2({ eyebrow = "v2.0 · Open source", title = "Install it once. Use it everywhere.", description = "A developer tool that fits your stack in one command, with typed APIs, sensible defaults and nothing to configure on day one.", command = "create-acme-app@latest my-app", primaryAction = { label: "Read the docs", href: "#" }, secondaryAction = { label: "View on GitHub", href: "#" }, className, ...props }: Hero2Props) { return ( <section data-slot="hero-2" className={cn("relative isolate overflow-hidden", className)} {...props}> <div aria-hidden="true" className="absolute inset-x-0 top-0 -z-10 h-[520px] bg-[radial-gradient(ellipse_60%_60%_at_50%_0%,color-mix(in_oklch,var(--ring)_18%,transparent),transparent_70%)]" /> <div className="mx-auto max-w-4xl px-4 pt-20 pb-16 text-center sm:px-6 md:pt-28"> <p className="font-mono text-xs tracking-[0.16em] text-muted-foreground uppercase">{eyebrow}</p> <TextReveal as="h1" className="mt-5 text-4xl font-semibold tracking-[-0.04em] text-balance sm:text-6xl"> {title} </TextReveal> <p className="mx-auto mt-6 max-w-2xl text-lg leading-relaxed text-pretty text-muted-foreground">{description}</p> <div className="mt-8 flex flex-wrap justify-center gap-3"> <a className={buttonVariants({ size: "lg", shape: "pill" })} href={primaryAction.href}> {primaryAction.label} <ArrowRight className="rtl:rotate-180"/> </a> <a className={buttonVariants({ variant: "outline", size: "lg", shape: "pill" })} href={secondaryAction.href}>{secondaryAction.label}</a> </div> <InstallTabs command={command} className="mx-auto mt-10 max-w-lg text-start" /> </div> <div className="mx-auto max-w-3xl px-4 pb-20 sm:px-6"> <div className="relative rounded-xl"> <Terminal title="~/projects" className="w-full"> <TerminalLine variant="command">npx {command}</TerminalLine> <TerminalLine>Creating a new app in ./my-app</TerminalLine> <TerminalLine>Installing dependencies…</TerminalLine> <TerminalLine variant="success">Ready in 4.2s</TerminalLine> <TerminalLine variant="comment"># cd my-app && npm run dev</TerminalLine> </Terminal> <BorderBeam duration={8} className="rounded-xl" /> </div> </div> </section> ) } export { Hero2, type Hero2Props }Update the import paths to match your project setup.
Usage
import { Hero2 } from "@/components/ballmac/blocks/hero-2/hero-2"
export default function Hero2Demo() {
return <Hero2 />
}Dependencies
- npm
- lucide-react
Use with AI
The top section for a CLI, SDK or library: the install command is the call to action. Set `command` to your package's command without the runner. With the shadcn MCP server set up (guide), ask your agent:
Add the Ballmac UI Hero 2: developer tool with install command (@ballmac/hero-2) to this project with the shadcn MCP, then use it where it fits.
Use it for
- Developer tools, SDKs and open-source libraries
- Pages where installing is the first step
Not for
- Consumer or visual products (use hero-1)
Registry JSON: https://ui.ballmac.com/r/hero-2.json
Free to use in personal and commercial projects.
More hero blocks
Hero 1: split with product visual
Split hero: badge, word-by-word headline, two calls to action and proof points on the left, a live product summary card on the right, over an animated grid.
Hero 3: AI product with live prompt
Hero for AI products: a real prompt input on the left, and on the right a mock answer with a reasoning panel, a tool call and a streaming reply.
Hero 4: split with interactive globe
Split hero with a live pill, headline, two actions and headline stats beside a large draggable WebGL globe marking your regions.
Hero 5: Mac app with opening laptop
Centered hero for a Mac app: shiny highlighted headline, download button and requirements, over a laptop whose lid opens into view on a live app window.