# @brianmcallister/react-highlight-text

> React binding for @brianmcallister/highlight-text

Latest version **1.0.7** (published 2022-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @brianmcallister/react-highlight-text
pnpm add @brianmcallister/react-highlight-text
yarn add @brianmcallister/react-highlight-text
bun add @brianmcallister/react-highlight-text
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2022-04-09 |
| First published | 2019-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brian Wm. McAllister |
| Maintainers | brianmcallister |
| Keywords | highlight, highlight-text, react |

## Links

- npm: https://www.npmjs.com/package/@brianmcallister/react-highlight-text
- Repository: https://github.com/brianmcallister/react-highlight-text
- Homepage: https://react-highlight-text.netlify.com/
- Issues: https://github.com/brianmcallister/react-highlight-text/issues
- npm.io page: https://npm.io/package/@brianmcallister/react-highlight-text

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [@brianmcallister/highlight-text](https://npm.io/package/@brianmcallister/highlight-text.md) ^2.0.1

## 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

- 1.0.7 (latest) — 2022-04-09
- 1.0.6 — 2020-10-11
- 1.0.5 — 2020-04-05
- 1.0.4 — 2020-01-10
- 1.0.3 — 2019-11-18
- 1.0.2 — 2019-11-16
- 1.0.1 — 2019-11-12
- 1.0.0 — 2019-11-10
- 0.1.0-beta.2 — 2019-11-10
- 0.1.0-beta.1 — 2019-11-10
- 0.1.0-beta.0 — 2019-11-10

## README

# @brianmcallister/react-highlight-text

[![codecov](https://codecov.io/gh/brianmcallister/react-highlight-text/branch/master/graph/badge.svg)](https://codecov.io/gh/brianmcallister/react-highlight-text) [![CircleCI](https://circleci.com/gh/brianmcallister/react-highlight-text.svg?style=svg)](https://circleci.com/gh/brianmcallister/react-highlight-text) [![npm version](https://img.shields.io/npm/v/@brianmcallister/react-highlight-text?label=version&color=%2354C536&logo=npm)](https://www.npmjs.com/package/@brianmcallister/react-highlight-text)

> React binding for @brianmcallister/highlight-text

`react-highlight-text` is a React component that integrates with [`highlight-text`](https://github.com/brianmcallister/highlight-text).

## Table of contents

- [Demo](#demo)
- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
	- [`HighlightText`](#highlighttext)

## Demo

Hosted demo: [https://react-highlight-text.netlify.com/](https://react-highlight-text.netlify.com/)

You can also run the demo locally. To get started:

```sh
git clone git@github.com:brianmcallister/react-highlight-text.git
cd react-highlight-text/demo
npm i
npm start
```

###### [⇡ Top](#table-of-contents)

## Installation

```sh
npm install @brianmcallister/react-highlight-text
```

###### [⇡ Top](#table-of-contents)

## Usage

```js
import HighlightText from '@brianmcallister/react-highlight-text';

const MyComponent = () => (
  <HighlightText
    text="Hello world! I'm highlighted!"
    words={['world', 'highlighted']}
  />
);
```

###### [⇡ Top](#table-of-contents)

## API

### `HighlightText`

This is the default export. Use this React component to highlight words in text.

```js
interface Props {
  text: string;
  words: string[];
}
```

###### [⇡ Top](#table-of-contents)

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