1.0.7 • Published 2 years ago
@brianmcallister/react-highlight-text v1.0.7
@brianmcallister/react-highlight-text
React binding for @brianmcallister/highlight-text
react-highlight-text
is a React component that integrates with highlight-text
.
Table of contents
Demo
Hosted demo: https://react-highlight-text.netlify.com/
You can also run the demo locally. To get started:
git clone git@github.com:brianmcallister/react-highlight-text.git
cd react-highlight-text/demo
npm i
npm start
⇡ Top
Installation
npm install @brianmcallister/react-highlight-text
⇡ Top
Usage
import HighlightText from '@brianmcallister/react-highlight-text';
const MyComponent = () => (
<HighlightText
text="Hello world! I'm highlighted!"
words={['world', 'highlighted']}
/>
);
⇡ Top
API
HighlightText
This is the default export. Use this React component to highlight words in text.
interface Props {
text: string;
words: string[];
}
⇡ Top
1.0.7
2 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.1.0-beta.2
5 years ago
0.1.0-beta.1
5 years ago
0.1.0-beta.0
5 years ago