Highlight texts with regex!
npm install react-highlight-regexHighlight texts with regex!
> This packages needs String.prototype.matchAll to work properly. Check out availability on caniuse before use.
``bash`
$ yarn add react-highlight-regex
`jsx
import * as React from 'react';
import { Highlight } from 'react-highlight-regex';
function BasicUsage() {
return (
);
}
``
| name | type | description |
| ------------------ | ---------------- | ------------------------------------------------ |
| text | string | The text to be highlighted. |
| match | RegExp | Regular expression for content to be highlighted |
| highlightClassname | string(optional) | Classname for highlighted parts |