Skip to content
R

react-highlight-words

React component to highlight words within a larger body of text

by brianvaughnFree

#107in UI Libraries
0In stores

Description

react-highlight-words is a React component that highlights words within a larger body of text. You pass it an array of search terms and the…

Highlights

  • Highlights search terms within text
  • Active match and per-term class names
  • Custom tags and custom matching
  • Ignores accents when matching
  • TypeScript definitions included

Ratings & Reviews

No ratings yet

Be the first to rate react-highlight-words.

People also visit

R

react-highlighter

Highlight select fragments of texts

UI Libraries
Launch
R

react-highlight

React component for syntax highlighting

UI Libraries
Launch
V

vue-word-highlighter

The word highlighter library for Vue 2 and Vue 3

UI Libraries
Launch
R

rich-textarea

A small customizable textarea for React to colorize, highlight, decorate texts

UI Libraries
Launch
R

react-text-truncate

Truncate text for React.js

UI Libraries
Launch
R

react-pdf-highlighter

Set of React components for PDF annotation

UI Libraries
Launch

react-highlight-words FAQ

What does react-highlight-words do?

It highlights each occurrence of the search terms you give it inside a body of text.

How do I install it?

Run npm install react-highlight-words. TypeScript definitions are included in the published package.

Can I highlight one match differently?

Yes. The active match option lets you style a single occurrence.

Can it ignore accents?

Yes. There is an option for ignoring accents, so a plain search also matches accented forms.

Is there a demo?

Yes. The docs include a playground where you can try the props.

What are the best react-highlight-words alternatives?

Popular alternatives to react-highlight-words include react-highlighter, react-highlight and vue-word-highlighter. See all react-highlight-words alternatives

Developer Stuff

Badges