animbits

Text Highlight

Text 94

About

A text wrapper that animates a hand-drawn marker-style highlight bar sliding in behind a word or phrase, for drawing attention to key text on a page.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Text Highlight to your project and fits it to your theme.

Code

How Text Highlight is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import TextHighlight from "@/components/ui/text-highlight";

export default function TextHighlightDemo() {
  return (
    <div className="flex min-h-[400px] w-full items-center justify-center p-8">
      <p className="text-3xl font-semibold text-center text-foreground">
        Make your headline{" "}
        <TextHighlight color="#fde047">stand out</TextHighlight> with a marker
        highlight.
      </p>
    </div>
  );
}

Dependencies