CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/highlight-cycling

Highlight Cycling

A coloured highlighter sweeps across the line one word at a time — like a presenter underlining the key word as they speak it.

ReactFont#highlight#cycle#typography

Usage

import HighlightCycling from '@crazygl/hero-highlight-cycling';

export default function Hero() {
  return (
    <HighlightCycling
      heading="Design intentional. Ship ruthlessly."
      highlightColor="#ffd86b"
      stepMs={900}
    />
  );
}

Customise

  • Contentheading text (split on whitespace into highlightable words).
  • HighlighthighlightColor, stepMs (dwell time per word).
  • TypographytextColor, highlightTextColor, fontSize, headingFontFamily, headingFontWeight.
  • BackdroptransparentBackground, bgColor.

Best for

  • Marketing / SaaS landing headlines that need to draw the eye.
  • Agency and portfolio statement heroes.
  • Talk/conference and pitch-deck style title slides.
01 · Install the package

One command, zero config.

npm install @crazygl/hero-highlight-cycling
02 · Render the component

Import once, drop it in.

The component takes the same props you see in the live customizer on the right — every default ships poster-quality.

hero.tsx
import HighlightCycling from '@crazygl/hero-highlight-cycling';

export default function Landing() {
  return (
    <HighlightCycling />
  );
}
03 · Use it in a page

SSR-safe by default.

The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.

page.tsx
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';

import HighlightCycling from '@crazygl/hero-highlight-cycling';

export default function Page() {
  return (
    <section>
      <HighlightCycling
        heading="Say hi."
        subheading="Your new hero."
      />
      <article>
        <h2>Welcome</h2>
        <p>Your content keeps its own voice below the hero.</p>
      </article>
    </section>
  );
}
You might also like

Similar heroes

Highlight Text

A heading with marker-highlighter strokes drawn behind specific words — like a printed page someone marked up. Words wrapped in *asterisks* get highlighted with the accent colour.

Hover Text Highlight

A heading whose words light up on hover — a coloured backdrop wipes in from one side, and out the other when the cursor leaves. Pick Background (full bleed) or Underline (band only).

Font Changer

Heading cycles through a curated stack of Google Fonts on a timer — each crossfade preserves the line so the words stay readable while the personality changes. Per-font scale is auto-normalised so display, mono, and handwriting faces all read at the same visual size. Prefix and suffix stay in a fixed font when you only want part of the line to flip.

Selection Color

A long-form heading + body with a styled `::selection` — drag your cursor across it and the highlight is part of the brand. The demo auto-cycles a synthetic selection.

Gradient Text

Heading filled with a slowly drifting multi-stop linear gradient — three configurable colours, customizable angle, optional animation.

Mask Text Reveal

Text revealed as a moving circular mask sweeps across — the headline appears only where the image-shaped mask uncovers it.
Live customizer

Highlight Cycling

Highlight colourStep (ms)900msText colourHighlighted textFont size64pxFontWeight700Transparent backgroundBackground
CrazyGL · crazygl.comProgrammable hero sections for real websites.