@byndyusoft-ui/highlighter
v0.1.0
Published
Byndyusoft UI Highlighter React Component
Downloads
72
Readme
@byndyusoft-ui/highlighter
The Highlighter
component is a React component designed to display and highlight text that matches a specified pattern. This component is flexible and allows for custom highlighting styles, making it useful for various text-emphasizing purposes such as search result highlighting or keyword emphasis.
Features
- Pattern Matching: Highlights text matching a specified pattern.
- Case Sensitivity: Supports both case-sensitive and case-insensitive matching.
- Custom Highlighting: Allows the use of a custom function to define the highlighting style.
- Optimized Rendering: Uses React's memoization (
memo
) to prevent unnecessary re-renders.
Installation
npm i @byndyusoft-ui/highlighter
# or
yarn add @byndyusoft-ui/highlighter
License
This project is licensed under the ISC License.