Skip to content
Onycx-ui
ESC

Highlight Wipe

Reveal a heading with a left-to-right highlight as the section scrolls into view.

Dependencies
gsap
Size
223 lines
Controls
8 controls

Installation

CLI · shadcn registry

npx shadcn@latest add https://ui.onycx.dev/r/highlight-wipe.json

1 · Dependencies

npm install gsap

2 · Copy the source

components/onycx/highlight-wipe.tsx

Requires React 19 and Tailwind CSS v4. Copy the source from the highlight-wipe.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.

Props

PropTypeDefaultDescription
textstring—Heading copy; "\n" breaks a line.
eyebrowstring"A small studio.\nAn expansive point of view."Mono label in the left column. Empty hides it.
symbolstring"✳"Accent glyph under the eyebrow. Empty hides it.
bodystring—Paragraph under the heading. Empty hides it.
linkLabel / linkHrefstring"The minds behind the work" / "#"Underlined text link with an up-right arrow. Empty label hides it.
color / dimColorstring"#f9f9f9" / "#777777"Lit layer (currentColor) and the grey layer underneath.
accent / mutedstring"#e85002" / "#a7a7a7"Glyph colour; eyebrow and paragraph colour.
start / endnumber88 / 50Viewport percentages: wipe starts when the heading top hits start, ends when its bottom hits end.
scrubnumber0.7Seconds of smoothing between scroll and wipe.
classNamestring—Extra classes on the section.