highlight-react

quickstart

Installation

npm i highlighter-react

#or

yarn add highlighter-react

How to use

import Highlight from 'highlight-react/dist/highlight'

const Demo = () => {
  const searchTerm = 'hello';

  return (
    <Highlight search={searchTerm}>
      <div>
        <h1>Hello world!</h1>
      </div>
    </Highlight>
  );
};

export default Demo;

Captura de Pantalla 2022-04-04 a las 15 56 16

GitHub

View Github