# PageHighlight reference

Search highlighting for one page's text layer: the query to mark, and which of the page's matches is the selected one.

## Used by

- [Search](https://react-pdf-viewer-chi.vercel.app/react-pdf-viewer/search.md)

## Import

```ts
import type { PageHighlight } from '@kingtech/react-pdf-viewer';
```

## Properties

| Name | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | `string` | — | Yes | Text to highlight, case-insensitive. |
| `selected` | `number \| null` | — | Yes | Index of the page’s match to mark as selected. |

## Source

[packages/react-pdf-viewer/src/hooks/usePageRenderer.ts](https://github.com/kiralygyula92/react-pdf-viewer/blob/main/packages/react-pdf-viewer/src/hooks/usePageRenderer.ts#L46)

