Reflex Logo

Intro

Gallery

Hosting

Learn

Components

Recipes

API Reference

Onboarding

Library

/

Chakra

/

Typography

/

Highlight

The highlight component take in a string and display some of the words as highlighted text.

The words to highlight can be selected using the query prop.

You can also customize how the hightlight will be rendered with the styles prop.

Hello World, we have some highlight
rx.chakra.highlight(
    "Hello World, we have some highlight",
    query=["World", "some"],
    styles={
        "px": "2",
        "py": "1",
        "rounded": "full",
        "bg": "grey",
    },
)

Highlights a specific part of a string.

PropTypeDefault ValueValues
query
List
styles
Dict
{"px": "2", "py": "1", "rounded": "full", "bg": "teal.100"}

Event Triggers

See the full list of default event triggers

Did you find this useful?

HomeGalleryChangelogIntroductionHosting