@smileid/web-components
v11.3.0
Published
A collection of Web Components used by SmileID
Keywords
Readme
Instructions
These components can be used to capture id document or liveness images
Localization
The web components support multiple languages and string customization through the localisation module.
Quick Start
import {
setCurrentLocale,
getDirection,
} from '@smileid/web-components/localisation';
// Set language (supports 'en-GB', 'fr-FR', 'ar-EG')
await setCurrentLocale('fr-FR');
// Apply RTL direction for Arabic
document.documentElement.dir = getDirection();Customizing Strings
Override specific UI text:
await setCurrentLocale('en-GB', {
locales: {
'en-GB': {
selfie: {
instructions: {
title: 'Verify your identity with a selfie',
},
},
},
},
});Adding Custom Languages
Register a new language:
import {
registerLocale,
setCurrentLocale,
} from '@smileid/web-components/localisation';
registerLocale('sw-KE', {
direction: 'ltr',
common: {
back: 'Rudi',
continue: 'Endelea',
// ... all required keys
},
});
await setCurrentLocale('sw-KE');📖 Full Localization Guide - Complete documentation including available languages, all translation keys, and custom language setup.
Orchestration
To build your own flow, we have several components that can be used together.
document-capture-instructions
This is the screen used to instruct the user how to capture document using both the camera and/or upload.
