react-substring-highlighter
v0.0.3
Published
Plain text substring highlight component.
Downloads
124
Readme
React Substring Highlighter
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}]}/>
License
The code is available under MIT licence.