Web Customization
Customize Language
It is possible to configure the experience of the informational messages in the capture frames by changing their language. Use the enumerated type LocaleTypes, which contains the following values:
LocaleTypes.PT_BR: for Portuguese(Brazil);LocaleTypes.ES_MX: for Spanish(Mexico);LocaleTypes.ES_ES: for Spanish(Spain);LocaleTypes.EN_US: for English(USA).
See how to implement it in the example below:
import {
...
UnicoCheckBuilder,
LocaleTypes
...
} from "unico-webframe"
unicoCameraBuilder.setLocale(LocaleTypes.EN_US);Customize Capture Experience
This is an optional step, but highly recommended to ensure the capture process aligns with your company's visual identity.
To customize the capture frame using the Theme Builder, simply create an instance of the UnicoThemeBuilder class and invoke the methods that customize each of the properties of the capture frame, as demonstrated in the example below:
const unicoTheme = new UnicoThemeBuilder()
.setColorSilhouetteSuccess("#0384fc")
.setBackgroundColor("#dff1f5")
.setColorText("#0384fc")
.setBackgroundColorComponents("#0384fc")
.setColorTextComponents("#dff1f5")
.setBackgroundColorBoxMessage("#fff")
.setColorTextBoxMessage("#fff")
.setBackgroundColorButtons("#0384fc")
.setColorTextButtons("#dff1f5")
.setColorCancelButton("#0384fc")
.setColorProgressBar("#0384fc")
.setFontFamily("Arial, sans-serif") // v3.19.2+
.setHtmlPopupLoading(`<div style="position: absolute; top: 45%; right: 50%; transform:
translate(50%, -50%); z-index: 10; text-align: center;">Carregando...</div>`) // This parameter is specific to document capture
.build();After generating the theme object, as demonstrated above, it must be passed as a parameter to the setTheme method of the unicoCameraBuilder.
unicoCameraBuilder.setTheme(unicoTheme);Last updated
Was this helpful?