# Hero Rotating

> A headline whose key word takes turns — pure CSS cycle.

A shadcn/ui block from the [@blockforge](https://blockforge.terravidhal.me) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/blockforge/hero-rotating).

- Page, with a live preview: https://shadcn.exchange/r/blockforge/hero-rotating
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/blockforge/hero-rotating-light-b4b2521451dc1f74.png
- Registry item: https://blockforge.terravidhal.me/r/hero-rotating.json
- Categories: hero
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://blockforge.terravidhal.me/r/hero-rotating.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: `button`

## Files

### `registry/blocks/hero-rotating.tsx`

```tsx
import Link from "next/link";
import { ArrowRight } from "lucide-react";

import { Button } from "@/components/ui/button";

const words = ["faster", "cleaner", "tonight", "together"];

export default function HeroRotating() {
  return (
    <section className="relative overflow-hidden bg-background">
      <div
        aria-hidden
        className="absolute inset-0 bg-grid-sm mask-[linear-gradient(to_bottom,black_30%,transparent_85%)]"
      />
      <div className="relative mx-auto flex w-full max-w-3xl flex-col items-center px-6 py-24 text-center sm:py-32">
        <h1 className="text-4xl font-semibold tracking-tight text-balance sm:text-6xl">
          Ship your product{" "}
          <span
            className="relative inline-block h-[1.15em] w-[4.6em] overflow-hidden text-left align-bottom"
            aria-label="faster"
          >
            {words.map((word, index) => (
              <span
                key={word}
                aria-hidden={index > 0 ? true : undefined}
                style={
                  {
                    "--cycle-delay": `${index * 2}s`,
                  } as React.CSSProperties
                }
                className="absolute inset-0 underline decoration-border underline-offset-8 animate-word-cycle"
              >
                {word}
              </span>
            ))}
          </span>
        </h1>
        <p className="mt-6 max-w-xl text-lg text-pretty text-muted-foreground">
          The deployment platform that keeps up with every version of your
          ambition — one push, live everywhere.
        </p>
        <div className="mt-8 flex flex-col items-center gap-3 sm:flex-row">
          <Button size="lg" render={<Link href="#" />}>
            Start free
            <ArrowRight data-icon="inline-end" />
          </Button>
          <Button size="lg" variant="outline" render={<Link href="#" />}>
            Live demo
          </Button>
        </div>
      </div>
    </section>
  );
}
```
