Components/Mechanisms
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/highlighter
Highlighter highlights the parts of its text that match the match string, and keeps the structure of its child elements.
- 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 use it to emphasize static text. Use
<Text/> with the weight prop instead.
| Name | Type | Default | Description |
|---|
caseSensitive | boolean | false | Specifies whether the match is case sensitive. |
children | ReactNode | — | Sets the content to search for match in. The element structure is preserved, and each match is wrapped for highlighting. |
dataHook | string | — | 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. |
match | string | — | Sets the text to highlight in children. |
Import the driver matching your test environment:
| Method | Description |
|---|
html | Gets innerHTML |
getElement | Gets the driver element |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
- 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