registry/blocks/hero-rotating.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>
);
}





























