glasscn

Highlight Text

Text 153

About

Inline text highlight that draws a skewed colored background behind words, with preset color variants and custom background support.

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

Code

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

Usage.tsx

import { HighlightText } from "@/components/ui/highlight-text";

export default function HighlightTextDemo() {
  return (
    <div className="flex min-h-[300px] w-full items-center justify-center p-8">
      <p className="max-w-md text-center text-2xl font-semibold leading-relaxed text-foreground">
        Build interfaces that feel{" "}
        <HighlightText>effortless</HighlightText> and stay{" "}
        <HighlightText variant="yellow">delightful</HighlightText> for every{" "}
        <HighlightText variant="pink">user</HighlightText>.
      </p>
    </div>
  );
}

More by glasscn

View all
  • Liquid Text

    Liquid Text

    63
  • Liquid Watch

    Liquid Watch

    11

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    103
  • Rainbow Text Effect

    Rainbow Text Effect

    47
  • Motion Blur Text

    Motion Blur Text

    36
  • Text Loop

    Text Loop

    308
  • Text Reveal

    Text Reveal

    27
  • Animated Text

    Animated Text

    8
  • Apple Hello Effect

    Apple Hello Effect

    610
  • Typography

    Typography

    4