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
  • Text Animation

    Text Animation

    130
  • Short Slide Right

    Short Slide Right

    17
  • Lightning Text

    Lightning Text

    122
  • Word Pull Up

    Word Pull Up

    148
  • Mouse Quadrant Tracker

    Mouse Quadrant Tracker

    55
  • Text Wavy

    Text Wavy

    25
  • Text Roll

    Text Roll

    117
  • Modern animated multi words

    Modern animated multi words

    315