Skip to content
GitHub

Highlight

Highlight search terms within text.

Shark UI is a component library for building accessible web applications.

Installation

Usage

Examples

Multiple

Pass an array of strings to the query prop to highlight multiple substrings.

With the Highlight component, you can spotlight, emphasize and accentuate words.

Search Query

Use the Highlight component to highlight search query results.

Search result for: spot

  • Spotlight bulb
  • Spot cleaner
  • Spot ceiling

With Squiggle

Use a custom decoration like a wavy underline for a fancier highlight effect.

Endless scale, powered by real humans.

Custom Style

Use the className prop to customize the style of the highlighted text.

With the Highlight component, you can spotlight words.

API Reference

Highlight


For a complete list of props, see the Ark UI documentation.