React Highlight Words
react-highlight-words
React component to highlight words within a larger body of text
Component Libraries
react
reactjs
react-component
highlighter
highlight
text
words
matches
substring
occurrences
Stars
1
Weekly
0
Open issues
0
Bundle
~60 kB
Installation
npm install react-highlight-wordsCode example
import { Button } from "react-highlight-words";
export function Example() {
return (
<div className="flex gap-2">
<Button>Primary</Button>
<Button variant="outline">Secondary</Button>
</div>
);
}Pros & cons
Pros
- Actively maintained by Brian Vaughn
- 0 weekly downloads. Battle tested
- MIT licensed
Considerations
- Adds roughly ~60 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 0 open issues on GitHub