Skip to content

React, Vue and Angular

A ready-made component is included for React. Props are the camelCase form of the HTML attributes.

import { TechsignKyc } from '@techsign/kyc/react';
export function KycPage({ token }: { token: string }) {
return (
<div style={{ height: '100vh' }}>
<TechsignKyc
token={token}
domain="https://demo.api.proveid.io"
lang="en"
enableFace
allowDesktop={false}
includeImages={false}
requestTimeoutMs={90_000}
messages={{ en: { continue: 'Next' } }}
onReady={() => console.log('ready')}
onStepChange={(d) => console.log(d.step)}
onCaptured={(d) => console.log(d.step)}
onComplete={(detail) => {
// send detail.transactionId to your server
}}
onError={(err) => {
console.error(err.code, err.message, err.retryable);
}}
/>
</div>
);
}

Use a ref to reach the element:

import type { TechsignKycElement } from '@techsign/kyc';
const ref = useRef<TechsignKycElement>(null);
// …
await ref.current?.retryStep();