Skip to content

prince8verma/react-native-text-highlight

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-text-highlight

Small library for highlighting text in react-native.

Installation

npm install react-native-text-highlight --save

Usage

import TextHighlight from 'react-native-text-highlight';
...
<TextHighlight
  highlight="code"
  highlightStyle={{
    color: 'green'
  }}
  style={{
    color: 'red'
  }}
>
  People love to code in javascript.
</TextHighlight>
Property Description default
highlight The key that will be searched for in the str. null
caseSensitive Determines if the search should be case sensitive false

Examples

  • str: "People love to code in javascript."
  • highlight: "code"
  • caseSentive: false
  • Result: "People love to code in javascript."

Todo

  • Change the component to accept the str as a child to the component instead of property.
  • Add an Example project.
  • Add Screenshot of the component being used.

About

Small library for highlighting text in react-native.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%