React Text Highlighting Component – TextIlluminator

Description:

TextIlluminator is a React component designed to highlight specific text within a larger body of text.

It can be useful for indicating search results, highlighting keywords, or emphasizing certain terms.

How to use it:

1. Install and import the ReactTextIlluminator into your React project.

# Yarn
$ yarn add react-text-illuminator
# NPM
$ npm install react-text-illuminator
import React from 'react';
import ReactTextIlluminator from 'react-text-illuminator';

2. Add the TextIlluminator component to your app and specify the text to be highlighted within any text.

const App = () => {
  return (
    <div>
      <ReactTextIlluminator
        textContent="Any Content Here"
        highlightTerm="ReactScript"
        highlightColor="yellow"
      />
    </div>
  );
};
export default App;

Preview:

React Text Highlighting Component TextIlluminator

Add Comment