# Highlight

Marks every match of a search query inside text.

Import from `@a31labs/rax/highlight`.

## Usage

```tsx
<SearchInput value={q} onValueChange={setQ} />
<Highlight query={q}>{row.name}</Highlight>
```

## Rules

Props: `query` (a string or string[]), `children` (a string). Every case-insensitive match is wrapped in `<mark>`, semibold on a translucent accent fill, so it stays visible on selected rows. Regex characters match literally, longer terms win where terms overlap, an empty query renders plain text. Put it next to a SearchInput, for example in DataTable cells.

Page: https://rax.a31.at/components/highlight
