Find.Root creates a FindState that searches page by page from the current one, streaming results. Matches carry PDF quads, so they can be drawn, listed and focused.
Anatomy
Usage
- Options:
caseSensitive,diacritics,wholeWord,regex— as props orFind.Toggle. Find.Layer show="all" | "current" | "none"picks which matches are drawn; non-current matches carrydata-other; thematchsnippet lets you draw them yourself.- Ctrl/⌘ + F focuses
Find.Input(seeded with the selection); Enter / ↓ and Shift + Enter / ↑ step through matches (not while an input method is composing). Minimap.Markers findshows every hit on a minimap.
API reference
Find.Root
A provider: renders no element of its own.
Find.Input
Renders a <input> (or your element via child) and accepts its HTML attributes.
data-pdf-find-inputFind.Next
Renders a <button> (or your element via child) and accepts its HTML attributes.
No props of its own besides ref, child and children.
data-pdf-find-nextFind.Prev
Renders a <button> (or your element via child) and accepts its HTML attributes.
No props of its own besides ref, child and children.
data-pdf-find-prevFind.Toggle
Renders a <button> (or your element via child) and accepts its HTML attributes.
data-activedata-pdf-find-toggleFind.Count
Renders a <div> (or your element via child) and accepts its HTML attributes.
No props of its own besides ref, child and children.
data-pdf-find-countdata-statusFind.Result
Renders a <button> (or your element via child) and accepts its HTML attributes.
data-activedata-pagedata-partdata-pdf-find-resultFind.Layer
Renders a <div> (or your element via child) and accepts its HTML attributes.
data-currentdata-otherdata-pdf-find-layerdata-pdf-find-match