react-markify

React component to highlight words.

Usage no npm install needed!

<script type="module">
  import reactMarkify from 'https://cdn.skypack.dev/react-markify';
</script>

README

react-markify

React component to highlight words.

Most of the codes are borrowed from react-linkify.

Installation

$ npm install react-markify

Usage

Any target word that appears inside the Markify component will become highlighted.

<Markify targetWord="JavaScript">
  <span>React is a JavaScript library for building user interfaces.</span>
</Markify>