Customization
The UI comes in Turkish and English. You can change any text; keys you don’t pass keep their defaults.
import { setMessages, setMessagesAll, clearMessages } from '@techsign/kyc';
setMessages('en', { select_card_type: 'Choose your document', continue: 'Next', retry: 'Try again',});
setMessagesAll({ tr: { capture: 'Çek' }, en: { capture: 'Capture' },});
clearMessages(); // undo every override- On the element:
kyc.setMessages('en', { … }),kyc.clearMessages() - React:
messages={{ en: { continue: 'Next' } }}
Choose the light or dark look with theme="light" (default) or theme="dark".
Serving the model files yourself
Section titled “Serving the model files yourself”The document detection models are downloaded from a public CDN by default. Serving them from your own server is faster and gives you more control:
<techsign-kyc assets-base="https://cdn.your-domain.com/kyc-assets"></techsign-kyc>Expected folder layout (the model package is delivered to you separately):
kyc-assets/ card/model/model.json card/model/*.bin card/model/blur/model.json card/model/blur/*.bin vendor/... (optional: TF.js, WASM, MediaPipe)Preloading
Section titled “Preloading”Downloading the models before the user reaches the flow speeds up the first screen:
import { preloadAssetHints, warmupAssets } from '@techsign/kyc';
preloadAssetHints('https://cdn.your-domain.com/kyc-assets', true);void warmupAssets({ assetsBase: 'https://cdn.your-domain.com/kyc-assets', enableFace: true,});