Highlight
Used to mark or highlight matched text content. For example, used to highlight search results.
Import
import { Highlight } from 'rsuite';Examples
Default
Highlight with multiple words
Custom Highlight
Combine with search
Props
<Highlight>
| Property | Type(Default) |
Description |
|---|---|---|
| children | ReactNode | The content to highlight. |
| classPrefix | string ('highlight') |
The prefix of the component CSS class. |
| query | string | string[] | The keyword to highlight. |
| renderMark | (match: string, index: number) => ReactNode | Custom render the highlight mark. |