Highlighter

Components/Mechanisms

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/highlighter

Overview

Copy

Highlighter highlights the parts of its text that match the match string, and keeps the structure of its child elements.

Do

  • Use it to highlight the text that matches what users typed, such as in search results or dropdown options.
  • Use it to show users why an item matches their search.

Don't

  • Don't use it to emphasize static text. Use <Text/> with the weight prop instead.

Feature examples

Interactive

Copy

Code

Copy

Props

NameTypeDefaultDescription
caseSensitivebooleanfalseSpecifies whether the match is case sensitive.
childrenReactNode—Sets the content to search for match in. The element structure is preserved, and each match is wrapped for highlighting.
dataHookstring—Applied as data-hook HTML attribute that can be used in the tests.
emphasize"text" | "background"'text'Controls how matches are highlighted. 'text' renders them in bold and 'background' applies a background color.
matchstring—Sets the text to highlight in children.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
htmlGets innerHTML
getElementGets the driver element
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.331.0 (2026-10-01) — fix: the caseSensitive prop now works and is typed; set it to highlight only matches with the same letter case. (#17293)
  • 1.328.0 (2026-09-22) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.320.0 (2026-09-03) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.304.0 (2026-07-24) — maintenance release, no component-specific changes
  • 1.295.0 (2026-07-03) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.278.0 (2026-05-08) — maintenance release, no component-specific changes
  • 1.267.0 (2026-04-09) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.241.0 (2025-12-17) — maintenance release, no component-specific changes
  • 1.116.0 (2024-07-22) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?