🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

ar-react-native-text-highlight

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ar-react-native-text-highlight

React Native component used to highlight character within a word. This is a port of [react-native-text-highlight](https://github.com/Anand-Rakesh/React-Native-Text-Highlight).

latest
Source
npmnpm
Version
0.0.15
Version published
Maintainers
1
Created
Source

React Native Text Highlight

React Native component used to highlight character within a word. This is a part of ar-react-native-text-highlight.

Check out a example.

Installation

Using npm:

npm i --save ar-react-native-text-highlight

Using yarn:

yarn add ar-react-native-text-highlight

Usage

To use it, just provide it a search text and searchable word with if searchable true or false.

import {TextHighlight} from 'ar-react-native-text-highlight';

<TextHighlight
  text={`Anand Rakesh`}
  isSearchable={true}
  highlightedColor={'yellow'}
  searchText={'Ra An'}
/>;

And the Highlighter component will highlight all occurrences of search terms within the text: Note - This is all the dummy data which are used in example.

screen shot 2015-12-19 at 8 23 43 am screen shot 2015-12-19 at 8 23 43 am screen shot 2015-12-19 at 8 23 43 am screen shot 2015-12-19 at 8 23 43 am

Props

PropertyTypeRequired?Description
textStringThe text which is need to display
styleObjectStyles applied to text
isSearchableBooleanif you want to search(hightlight) character in word pass as true value or else false default value is false
highlightedColorStringApply any color you want to show in highlighted text Default value is yellow wrapper
searchTextStringSearchable text value.

License

MIT License - fork, modify and use however you want.

Keywords

react

FAQs

Package last updated on 06 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts