Highlighted text preview

Highlighted text

An inline marker that sweeps behind a phrase and inverts the text it covers.

  • Group
    Text effects
  • Origin
    Adapted · Spell UI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/highlighted-text

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { HighlightedText } from "@/registry/components/highlighted-text/highlighted-text";

<HighlightedText>Label</HighlightedText>

Props

PropTypeDefaultDescription
childrenReactNode
className?string
from?From"bottom"Side the marker sweeps in from.
delay?number0Seconds before the sweep.
inView?booleanfalseWait until the text scrolls into view.
once?booleantrue

When to use

Emphasising a phrase inside a headline or paragraph.

When not to use

Long passages or many highlights per screen.

Related

Blur reveal · Text reveal