Skip to main content

API

OCRCamera

The following set of props can be passed to the OCRCamera component:

propdescriptiontypedefault value
fpsTarget frames per second that the camera should use. Can be reduced to limit fps drops when scanning many text blocks simultaneouslynumber
enableConfirmTextDialogControls whether a confirm selection dialog is shown when the user clicks a highlighted text block. If true, onSelectTag is called after the user presses confirm in the dialog. If false, onSelectTag is called immediately when the user clicks a highlighted text blockboolean
textHighlightColorColor of the bounding box shown around text blocksColor
buttonConfigCustomize which buttons to show on the top right of the screenButtonConfig
onSelectTagIs called when the user confirms selected text(tag: string) => void
onCloseIs called when the user clicks the close button() => void
shouldHighlightTextIs called whenever a block of text is detected. If this returns false, then the text block is not highlighted on screen and is not pressable(text: string, textBoundingBox: BoundingBox) => boolean