# 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.

A shadcn/ui block from the [@ballmac](https://ui.ballmac.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/ballmac/hero-2).

- Page, with a live preview: https://shadcn.exchange/r/ballmac/hero-2
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/ballmac/hero-2-light-a61c42f901602e3d.png
- Registry item: https://ui.ballmac.com/r/hero-2.json
- Categories: blocks, hero
- Listed: 2026-10-14, source last changed 2026-10-14

## Install

```bash
npx shadcn@latest add https://ui.ballmac.com/r/hero-2.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `utils`, `https://ui.ballmac.com/r/border-beam.json`, `https://ui.ballmac.com/r/button.json`, `https://ui.ballmac.com/r/install-tabs.json`, `https://ui.ballmac.com/r/terminal.json`, `https://ui.ballmac.com/r/text-reveal.json`

## Files

### `registry/ballmac/components/blocks/hero-2/hero-2.tsx`

```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 }
```
