CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/highlighttext

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.

ReactFont#highlight#marker#typography#headline

Usage

import HighlightText from '@crazygl/hero-highlighttext';

export default function Hero() {
  return (
    <HighlightText
      heading={"We *build* premium\n*landing pages* fast."}
      highlightColor="#ffd84a"
    />
  );
}

Customise

  • Contentheading (use \n for line breaks; wrap words in *asterisks* to highlight).
  • HighlighthighlightColor, highlightOpacity, highlightSkew, highlightPadding, autoplayDraw.
  • TypographytextColor, fontSize, lineHeight, letterSpacing, textAlign, headingFontFamily, headingFontWeight.
  • BackdroptransparentBackground, bgColor.

Best for

  • Marketing and agency landing pages with a punchy value-prop headline.
  • Editorial / type-forward hero statements.
  • Any page that wants to emphasise a couple of key words.
01 · Install the package

One command, zero config.

npm install @crazygl/hero-highlighttext
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 HighlightText from '@crazygl/hero-highlighttext';

export default function Landing() {
  return (
    <HighlightText />
  );
}
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 HighlightText from '@crazygl/hero-highlighttext';

export default function Page() {
  return (
    <section>
      <HighlightText
        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 Cycling

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

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).

Blend Text

A heading with CSS mix-blend-mode applied so it changes appearance against whatever sits behind it — picks the inverse colour of the backdrop pixel, like ink on a poster.

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.

Text Cycler

A wordmark that cycles between several words or phrases, each one entering with a character-, word-, or line-staggered fade — pick the stagger order from first / last / center / random.

Rotating Headline

A static two-line headline with one slot that rotates through a list of words — the prefix and suffix stay put, the rotating word cycles.
Live customizer

Highlight Text

Highlight colourHighlight opacity1Highlight skew-2°Highlight padding4pxDraw on loadHighlight strokes animate in from left.Text colourFont size96pxLine height1.2Letter spacing-0.02emAlignmentFontWeight700Transparent backgroundBackground colour
CrazyGL · crazygl.comProgrammable hero sections for real websites.