Skip to content

Split hero

A two-tone heading and one action beside the product, lit from above.

93 lines · React · Tailwind 4

Install

$ bunx shadcn@latest add @blocco/hero-split

Code

blocks/free/hero-split.tsx93 lines
import { Button } from "@/registry/blocco/ui/button";
import { buttonClass } from "@/registry/blocco/ui/button-class";
import { Badge } from "@/registry/blocco/ui/misc";
import { ArrowRight } from "@/registry/blocco/ui/icons";

/**
 * A two-tone heading and one action beside the product, lit from above.
 * The product is the real UI over sample data, never a screenshot.
 */
export default function HeroSplit() {
  return (
    <section className="mx-auto grid max-w-6xl items-center gap-12 overflow-x-clip px-6 py-16 sm:py-24 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.05fr)] lg:gap-16">
      <div>
        <h1 className="text-4xl font-bold tracking-tight text-balance sm:text-6xl">
          Short links on your domain. <span className="text-muted">Clicks you can trust.</span>
        </h1>
        <p className="mt-5 max-w-lg text-lg text-pretty text-muted">
          Make a link, put it anywhere, and see who followed it. No visitor’s IP address is ever
          stored.
        </p>
        <div className="mt-8 flex flex-wrap items-center gap-3">
          <Button variant="primary" className="h-11 px-5">
            Start free
          </Button>
          <a href="#pricing" className={buttonClass({ variant: "ghost", className: "h-11 px-4" })}>
            See pricing <ArrowRight size={16} />
          </a>
        </div>
        <p className="mt-6 text-sm text-muted">
          30 links and 1,000 clicks a month on the free plan.
        </p>
      </div>

      <div className="relative">
        <div
          aria-hidden
          className="landing-mesh pointer-events-none absolute -inset-8 opacity-70"
        />
        <div className="lit relative rounded-2xl bg-surface p-5 smooth-shadow-ring-xs">
          <div className="flex items-center justify-between gap-3">
            <p className="font-semibold">Spring launch</p>
            <Badge color="mint">Active</Badge>
          </div>
          <p className="mt-1 font-mono text-sm text-accent">go.example.com/spring</p>
          <div className="mt-5 grid grid-cols-3 gap-3">
            {[
              ["Clicks", "4,120"],
              ["Visitors", "3,387"],
              ["Countries", "41"],
            ].map(([label, value]) => (
              <div key={label} className="rounded-xl bg-surface-2 p-3">
                <p className="text-xs text-muted">{label}</p>
                <p className="tnum mt-1 text-xl font-semibold">{value}</p>
              </div>
            ))}
          </div>
          <svg viewBox="0 0 300 80" className="mt-5 h-24 w-full" aria-hidden>
            <path
              d="M0 70 C 30 66, 45 58, 70 56 S 115 40, 140 44 S 185 22, 210 26 S 255 10, 300 8 L 300 80 L 0 80 Z"
              className="fill-chart/12"
            />
            <path
              d="M0 70 C 30 66, 45 58, 70 56 S 115 40, 140 44 S 185 22, 210 26 S 255 10, 300 8"
              className="fill-none stroke-chart"
              strokeWidth="2"
            />
          </svg>
          <ul className="mt-3 grid gap-1.5 text-sm">
            {[
              ["google.com", 62],
              ["x.com", 24],
              ["Direct", 14],
            ].map(([source, share]) => (
              <li
                key={source}
                className="relative flex h-7 items-center justify-between overflow-hidden rounded-md px-2.5"
              >
                <span
                  aria-hidden
                  className="absolute inset-y-0 left-0 rounded-md bg-accent/12"
                  style={{ width: `${share}%` }}
                />
                <span className="relative">{source}</span>
                <span className="tnum relative text-muted">{share}%</span>
              </li>
            ))}
          </ul>
        </div>
      </div>
    </section>
  );
}