React SDK 3.3.1
Sample Code
The quickest and simplest way to kickstart your journey with the React SDK is by downloading and experimenting with our full-featured sample code:
Download React Sample CodeIMPORTANT
In the above sample codes, the strings __YOUR_USER_ID__ and __YOUR_API_KEY__ should be replaced by your own User ID and API Key repectively. Please contact us to obtain your User ID and API Key.
Installation
In your React project, install the SDK with the npm install or yarn add commands. Please note that different frameworks require different packages.
npm install "https://sdk.panoptic.ai/npm/react-vital-sign-camera-3.3.1.tgz"yarn add "https://sdk.panoptic.ai/npm/react-vital-sign-camera-3.3.1.tgz"TIP
If you are using Yarn v2 or later, you might need to include the package name in the command, such as yarn add vital-sign-camera@"https://sdk.panoptic.ai/npm/react-vital-sign-camera-3.3.1.tgz".
Vite Configuration
If you are using Vite as your build tool, you need to exclude ts-vital-sign-camera from dependency optimization to ensure proper functionality:
// vite.config.js
export default defineConfig({
optimizeDeps: {
exclude: ['ts-vital-sign-camera'],
},
});Deployment Notes
NOTE
If the project is deployed to Google Cloud, some web servers, such as serve, might not function correctly, causing the facial skin age feature to fail. To prevent this issue, use http-server instead.
What's new
3.3.1 (28-Oct-2026)
- Production release synced with TypeScript SDK 2.3.1.
- Fixed the server wake-up failure at camera start: the SDK now handles the error and reports it through the
onErrorcallback prop asWake-up request failed: <reason>instead of surfacing as an unhandled rejection. Scanning is unaffected. - Wrapper only: no React-specific API changes. No breaking API changes.
3.3.0 (09-Oct-2026)
- Production release synced with TypeScript SDK 2.3.0 (see the archives).
- Wrapper only: no React-specific API changes. All new core features (real-time estimation,
scanningSequence,thermalMask,heatmap, face mesh'ripple'/simplifyFaceMesh) are available through the pass-through props. - Note: the core SDK 2.3.0 release contains breaking renames (
RealtimeEstimatorType.Fda→Panoptic,realtimeEstimation→enableRealtimeEstimation,minDuration→signalQualityDelay).