# 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 version **0.0.15** (published 2023-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install ar-react-native-text-highlight
pnpm add ar-react-native-text-highlight
yarn add ar-react-native-text-highlight
bun add ar-react-native-text-highlight
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2023-04-06 |
| First published | 2023-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Anand_Rakesh |
| Maintainers | ananad_rakesh |
| Keywords | react, native, text, hightlight, color, search, filter, word, character, substring, matches, occurrences, highlighter, react-component, react-native |

## Links

- npm: https://www.npmjs.com/package/ar-react-native-text-highlight
- Repository: https://github.com/Anand-Rakesh/React-Native-Text-Highlight
- Homepage: https://github.com/Anand-Rakesh/React-Native-Text-Highlight#readme
- Issues: https://github.com/Anand-Rakesh/React-Native-Text-Highlight/issues
- npm.io page: https://npm.io/package/ar-react-native-text-highlight

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.15 (latest) — 2023-04-06
- 0.0.14 — 2023-03-29
- 0.0.13 — 2023-03-29
- 0.0.12 — 2023-03-29
- 0.0.11 — 2023-03-28
- 0.0.10 — 2023-03-28
- 0.0.9 — 2023-03-28
- 0.0.8 — 2023-03-28
- 0.0.7 — 2023-03-28
- 0.0.6 — 2023-03-28
- 0.0.5 — 2023-03-28
- 0.0.4 — 2023-03-28
- 0.0.3 — 2023-03-28
- 0.0.2 — 2023-03-28
- 0.0.1 — 2023-03-27

## README

# React Native Text Highlight

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

Check out a [example](https://github.com/Anand-Rakesh/React-Native-Text-Highlight/tree/main/src/example).

## Installation

Using [npm](https://www.npmjs.com/package/ar-react-native-text-highlight):

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

Using [yarn](https://www.npmjs.com/package/ar-react-native-text-highlight):

```
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.

```jsx
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.

<img width="368" alt="screen shot 2015-12-19 at 8 23 43 am" src="https://raw.githubusercontent.com/Anand-Rakesh/React-Native-Text-Highlight/main/Images/Simulator%20Screen%20Shot%20-%20iPhone%2014%20-%202023-03-27%20at%2019.19.05.png" style="
    border: 3px solid red;">
<img width="368" alt="screen shot 2015-12-19 at 8 23 43 am" src="https://raw.githubusercontent.com/Anand-Rakesh/React-Native-Text-Highlight/main/Images/Simulator%20Screen%20Shot%20-%20iPhone%2014%20-%202023-03-27%20at%2019.19.13.png" style="
    border: 3px solid red;">
<img width="368" alt="screen shot 2015-12-19 at 8 23 43 am" src="https://raw.githubusercontent.com/Anand-Rakesh/React-Native-Text-Highlight/main/Images/Simulator%20Screen%20Shot%20-%20iPhone%2014%20-%202023-03-27%20at%2019.19.17.png" style="
    border: 3px solid red;">
<img width="368" alt="screen shot 2015-12-19 at 8 23 43 am" src="https://raw.githubusercontent.com/Anand-Rakesh/React-Native-Text-Highlight/main/Images/Simulator%20Screen%20Shot%20-%20iPhone%2014%20-%202023-03-27%20at%2019.19.23.png" style="
    border: 3px solid red;">

## Props

| Property         | Type    | Required? | Description                                                                                                 |
| :--------------- | :------ | :-------: | :---------------------------------------------------------------------------------------------------------- |
| text             | String  |     ✓     | The text which is need to display                                                                           |
| style            | Object  |           | Styles applied to text                                                                                      |
| isSearchable     | Boolean |           | if you want to search(hightlight) character in word pass as true value or else false default value is false |
| highlightedColor | String  |           | Apply any color you want to show in highlighted text Default value is yellow wrapper                        |
| searchText       | String  |           | Searchable text value.                                                                                      |

## License

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

---
_Source: https://npm.io/package/ar-react-native-text-highlight · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
