Skip to content

Highlighter

Draws a highlight, underline, or circle on a phrase when it comes into view.

Plan the launch, write the copy, and ship on the same day.

highlighter-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Usage

lead.tsx

Variants

Also install Button.

Every plan includes unlimited guests.

Reviews take minutes, not days.

Start with one template.

highlighter-variants-demo.tsx

Sequence

Use delay to draw marks one after another. Set --highlighter-color to change the color.

Write it once, publish it everywhere.

highlighter-sequence-demo.tsx

API reference

variant: "highlight" | "underline" | "circle" = "highlight"
Sets the mark to draw. A highlight wraps with the text. An underline or a circle keeps the phrase together.
trigger: "mount" | "in-view" = "in-view"
Draws the mark on mount or when the phrase is in view.
delay: number = 0
Time in seconds to wait before the mark draws.
--highlighter-color: CSS color = var(--chart-3)
Color of the mark. Set it in className.