Highlight Text
Inline text highlight with preset color variants and custom background class support.













Highlight text
import { HighlightText } from "@/components/ui/highlight-text"
export function HighlightTextDemo() {
return <HighlightText variant="lime">Highlight text</HighlightText>Installation
$ npx shadcn add @glasscn/highlight-textVariants
lime
Highlight text
yellow
Highlight text
pink
Highlight text
cyan
Highlight text
orange
Highlight text
API
Prop
Type
Default
Description
HighlightText
variant"lime" | "yellow" | "pink" | "cyan" | "orange""lime"Controls the preset highlight color.
HighlightText
classNamestring-Applies custom classes to the highlight background layer, such as a custom bg-* utility.
HighlightText
...propschildren: React.ReactNode-Props from the underlying shadcn/ui primitive.