About
An animated demo cursor that loops forever, sweeping a highlight box and accent colour across headline text one phrase at a time, then fading and moving to the next.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Infinite Highlight Sweep to your project and fits it to your theme.
Code
How Infinite Highlight Sweep is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import {
InfiniteHighlightSweep,
SweepText,
} from "@/components/ui/infinite-highlight-sweep";
export default function InfiniteHighlightSweepDemo() {
return (
<InfiniteHighlightSweep
color="#5fd4bf"
className="min-h-full w-full bg-background text-foreground"
style={{ fontFamily: "ui-sans-serif, system-ui" }}
>
<div className="mx-auto flex min-h-full w-full max-w-5xl flex-col justify-center px-5 py-16 sm:px-10">
<p className="font-mono text-[11px] uppercase tracking-[0.18em] text-foreground/45">
Weekend planner · Muscat
</p>
<h2 className="mt-5 text-[clamp(2rem,6.4vw,4.6rem)] font-medium leading-[1.12] tracking-[-0.035em]">
<SweepText
as="span"
text="Plan the whole weekend —"
className="block"
/>
<SweepText
as="span"
order={1}
text="you'll actually be there."
className="block"
/>
</h2>
<SweepText
order={2}
text="[[The weekend planner that books everything in one go]] — dinner at Bait Al Luban, a dhow at sunset, the Wadi Shab hike — and tells everyone where to be, and when."
className="mt-7 max-w-[46ch] text-[clamp(1.05rem,1.8vw,1.3rem)] leading-[1.55] text-foreground/80"
/>
</div>
</InfiniteHighlightSweep>
);
}
















