lifeweb-text-highlighter
TypeScript icon, indicating that this package has built-in type declarations

1.7.1 • Public • Published

text highlighter

NPM version NPM downloads NPM downloads MIT License

Text Highlight

text highlighter... :)

Installation

npm i lifeweb-text-highlighter

Usage

import Highlighter from 'lifeweb-text-highlighter'

<Highlighter
    searchWords = {[{text: "test", style: {backgroundColor: 'yellow'}}]}
    textToHighlight = {"this is a test"}
/>

Props

Attribute type default
caseSensitive boolean false
searchWords PatternItem[] []
textToHighlight string ''
globalClassName string null
globalStyle CSSProperties null
globalOnClick function null

Pattern Item

Attribute type default
text RegExp string ``
className string null
style CSSProperties {background: yellow}
onClick function null
render function null

License

MIT

author

Nafiseh Mahdianfar nama996


[Lifeweb Company] lifeweb.webapp@gmail.com

Package Sidebar

Install

npm i lifeweb-text-highlighter

Weekly Downloads

6

Version

1.7.1

License

MIT

Unpacked Size

83.6 kB

Total Files

4

Last publish

Collaborators

  • lifeweb
  • nama996