react-substring-highlighter

0.0.3 • Public • Published

React Substring Highlighter

npm version

var MatchHighlighter = require('react-substring-highlighter').MatchHighlighter;
 
<MatchHighlighter value="Foo Bar" lookup={/foo/i}/>
 
<MatchHighlighter value="Foo Bar" lookup="foo" caseInsensitive={true} count={1}/>
 
var RangeHighlight = require('react-substring-highlighter').RangeHighlight;
 
<RangeHighlight value="Foo Bar" ranges={[{offset: 1, length: 1}, {offset: 3, length: 1}]}/>

Live Demo

License

The code is available under MIT licence.

Readme

Keywords

Package Sidebar

Install

npm i react-substring-highlighter

Weekly Downloads

100

Version

0.0.3

License

MIT

Last publish

Collaborators

  • smikhalevski