glasscn

Highlight Text

Text 158

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

    65
  • Liquid Watch

    Liquid Watch

    13

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    110
  • Blur Reveal

    Blur Reveal

    313
  • Vapour Text Effect

    Vapour Text Effect

    2K
  • NeonRGBTextEffect

    NeonRGBTextEffect

    145
  • Rainbow Text Effect

    Rainbow Text Effect

    47
  • Shine Border

    Shine Border

    968
  • Apple Hello Effect

    Apple Hello Effect

    620
  • Text Highlight

    Text Highlight

    72