Index of the active match within matches, or null.
The active match, or null.
Scrolls to a match by index. Returns -1 if the index is out of range.
Scrolls to the next match. Does not wrap past the last one.
Scrolls to the previous match. Does not wrap past the first one.
Whether pages are still being scanned.
Total number of matches found so far.
Every match found so far, in page then in-page order. Grows while scanning.
Scan progress in [0, 1], or null before a search starts.
The current search text. Bind this to your input's value.
Clears the query, the matches and the painted highlights.
Sets the search text and (re)starts the search. Debounced by 500 ms unless told otherwise.
Search state and actions returned by usePdfSearch.