Skip to Content
DocsResourcesPricingShowcase

Highlight

Used to highlight substrings of a text.

SourceStorybookRecipeArk
With the Highlight component, you can spotlight words.

import { Highlight } from "@chakra-ui/react"
<Highlight query="Hello">Hello World</Highlight>

Pass an array of strings to the query prop to highlight multiple substrings.

With the Highlight component, you can spotlight, emphasize and accentuate words.

Use the styles prop to customize the style of the highlighted text.

With the Highlight component, you can spotlight words.

Use the highlight component to highlight search query results.

Search result for: spot

Spotlight bulb

Spot cleaner

Spot ceiling

PropDefaultType
query *
string | string[]

The query to highlight in the text

text *
string

The text to highlight

ignoreCase
boolean

Whether to ignore case while matching

matchAll
boolean

Whether to match multiple instances of the query

styles
SystemStyleObject

Previous

Heading

Next

Kbd