Lumeo

Highlighter

Wraps occurrences of one or more search terms within text with a highlight mark.

When to Use

  • Visually mark search matches within a block of text or list of results.
  • Highlight keywords in a read-only preview or document viewer.
  • Combine with a search input to give real-time match feedback.
The quick brown fox jumps over the lazy dog
React, Angular, and Blazor are popular UI frameworks

Case-insensitive (default): matches "blazor" → highlights "Blazor"

Blazor is awesome. blazor runs on .NET.

Case-sensitive: only exact "Blazor" matched

Blazor is awesome. blazor runs on .NET.

Default: partial matches included

highlight highlighting highlighted

Whole word: only standalone "highlight"

highlight highlighting highlighted
The quick brown fox jumps over the lazy dog

Keyboard Interactions

Key Action

Highlighter is a display-only component and has no keyboard interactions.

API Reference

Highlighter

Property Type Default Description
Textstring""The source text to render and search within.
Highlightstring?nullA single term to highlight. Combined with HighlightTerms.
HighlightTermsIEnumerable<string>?nullMultiple terms to highlight. Longest match wins when terms overlap.
CaseSensitiveboolfalsePerform case-sensitive matching.
WholeWordboolfalseOnly match whole words (adds word boundary anchors).
HighlightClassstring?nullExtra CSS classes applied to the <mark> element. Default style: bg-warning/30 text-foreground rounded-sm px-0.5.
Tagstring"mark"HTML element used to wrap matches. Defaults to <mark>.
  • Command — Command palette with built-in search highlighting.
  • Input — Use as the search input driving the highlight term.