HighlightText

Use the HighlightText component to highlight search words within a text.

<HighlightText
  searchWords={
    Array [
      "foo",
      "bar",
      "baz",
    ]
  }
>
  This text will be highlighted: foo, bar, and baz.
</HighlightText>
This text will be highlighted: foo, bar, and baz.