React components
biometry-react-components provides the capture half of an integration: camera
and microphone components that handle permissions, countdowns, recording windows
and the challenge phrase, then hand you ordinary File objects.
It has no HTTP layer. Components capture media and emit files; you send those files with the Web SDK or your own backend. That separation is deliberate — your API token never has to reach the browser.
Installation
npm install biometry-react-componentsComponents
| Component | Purpose |
|---|---|
FaceCapture | Still photo of a face |
DocScan | Photo of an identity document |
FaceRecorder | Video with spoken challenge digits, for verification |
VoiceRecorder | Voice enrollment across several takes |
import { FaceRecorder } from 'biometry-react-components';
<FaceRecorder challengeDigits={digits} recordingSeconds={10} onConfirmRecording={({ file, audio, phrase }) => upload(file)}/>Each component reports twice: once when media is captured, and again once the person has confirmed it. Use the confirmed callback for anything you upload — the first fires before the user has had a chance to retake.
Hooks
useRecorder, usePermissions and useAudioPermissions back the components and
are exported for building your own capture UI.
Full component and hook reference: the
biometry-react-components README
(npm).