Skip to main content

Customization

The SDK provides options to customize default look and feel presented to the end users. You can customize the following properties in order to align SDK look with the rest of your application:

PropertyTypeDescription
startScreenIconstringPath to the image or svg which will be used on the start screen instead of the default one. This path needs to be accessible by the root application
buttonBorderRadiusstring | numberRadius for the buttons. Accepts any valid CSS border radius value or number. If number is used it will corresponds to value in pixels.
fontFamilystringName of the font family to be used. This font needs to be loaded into parent application.
accent{ 25: string; 50: string; 100: string; 200: string; 300: string; 400: string; 500: string; 600: string; 700: string; 800: string; 900: string; }Primary color used in the app. Defined as the object of different shades of color based on the numeric scale.
resultsScreen{ identityVerifiedIcon?: string; identityNotVerifiedIcon?: string; identityVerifyingIcon?: string; }Paths to the images or svgs which will be used as replacement for the default images on the result screen to indicate status of verification process. This paths needs to be accesible by the root application.

To customize the theme, you need to pass an object which will properties you want to override, and pass it to the SDK as themeOverride property.

If you're using TypeScript, you can use the following interface to define your custom theme:


// If you're using React version
import { ThemeOverride } from '@microblink/platform-sdk/react';

// Or vanilla one

import { ThemeOverride } from '@microblink/platform-sdk/vanilla';

const customTheme: ThemeOverride = {
startScreenIcon: '/icons/start.svg', // Replace with your own path
buttonBorderRadius: 10,
fontFamily: 'Arial',
accent: {
25: '#f0f0f0',
50: '#e0e0e0',
100: '#d0d0d0',
200: '#c0c0c0',
300: '#b0b0b0',
400: '#a0a0a0',
500: '#909090',
600: '#808080',
700: '#707070',
800: '#606060',
900: '#505050',
},
resultsScreen: {
identityVerifiedIcon: '/icons/verified.svg', // Replace with your own path
identityNotVerifiedIcon: '/icons/not-verified.svg', // Replace with your own path
identityVerifyingIcon: '/icons/verifying.svg', // Replace with your own path
},
};

After you've defined all of the properties, you can pass the object to the SDK as themeOverride property as shown in the example above.

React

<IdvFlow
/* Other properties... */
themeOverride={customTheme}
/>

Vanilla

createIdvFlow({
apiConfig: {
url: '{url-to-your-proxy-service}',
workflowId: '{id-of-workflow-to-use}',
},
themeOverride: customTheme,
});

Translating the SDK

SDK provides options to change default English text shown to the end users to any other language. Table below show property names, their descriptions and default English text. You can customize the following properties in order to align SDK text with the rest of your application.

PropertyDescriptionDefault
actions.doneButton text for done actionDone
actions.tryAgainButton text for try again actionTry again
actions.startButton text for start actionStart
actions.continueButton text for continue actionContinue
actions.exitButton text for exit actionExit
statuses.cameraLoadingMessage indicating the camera is loadingCamera loading
statuses.checkingCameraMessage indicating the camera is being checkedChecking camera...
statuses.noInternetConnectionMessage indicating there is no internet connectionNo internet connection
statuses.processingMessage indicating processing is in progressProcessing...
statuses.verificationNotAvailableMessage indicating verification is not availableVerification not available
statuses.cameraPermissionRequiredTitleMessage indicating camera permission is requiredCamera permission required
statuses.cameraPermissionRequiredCaptionCaption indicating that camera permission is requiredWe don't have your permission to use the camera. To continue, please make sure that camera is enabled.
statuses.nextUpMessage indicating the next stepNext up
statuses.completedMessage indicating the process is completedCompleted
statuses.retakeSelfieTitleTitle for the retake selfie messageRetake selfie
statuses.retakeSelfieCaptionCaption for the retake selfie messageTry again, making sure your eyes are open, your face is fully visible and only one in the frame and there's good lighting.
statuses.noCameraDevicesMessage indicating there are no camera devicesNo camera devices found
statuses.documentNotSupportedTitleTitle for the document not supported messageDocument not accepted
statuses.documentNotSupportedCaptionCaption for the document not supported messageTry scanning a different document.
statuses.documentScanErrorTitleTitle for the document scan error messageScan again
statuses.documentScanErrorCaptionCaption for the document scan error messageTry again, ensuring your document is fully visible and well-lit. Keep the document steady to prevent any blurriness.
home.titleTitle for the home screenLet's verify your identity
home.captionCaption for the home screenThis will only take a couple of minutes.
home.additionalActionsCaptionCaption for additional actions on the home screenWe may ask you to take additional actions to complete your verification.
home.documentVerificationStepTitleTitle for the document verification step on the home screenScan your document
home.documentVerificationStepCaptionCaption for the document verification step on the home screenGo grab your ID
home.faceMatchStepTitleTitle for the face match step on the home screenTake a selfie
home.faceMatchStepCaptionCaption for the face match step on the home screenMake sure your face is well-lit
end.identityVerifiedTitleMessage indicating the identity is verifiedscreenIdentity verified!
end.identityVerifiedCaptionCaption for the identity verified message screenThank you for proving your identity - it was you all along!
end.identityNotVerifiedTitleMessage indicating the identity is not verifiedIdentity not verified
end.identityNotVerifiedCaptionCaption for the identity not verified messagesWe couldn't verify your identity this time. Please double-check your information and try again, or contact support for assistance.
end.identityVerifyingTitleMessage indicating the identity is being verifiedThanks! We're verifying your identity now
end.identityVerifyingCaptionCaption for the identity verifying messageWe've got everything we need. We'll notify you as soon as it's complete.
faceCapture.centerYourFaceMessage indicating that the user should center their faceCenter your face
faceCapture.placeFaceInFrameMessage indicating that the user should place their face within the framePlace your face in the frame
faceCapture.moveCloserMessage indicating that the user should move closer to the cameraMove closer
faceCapture.lookDirectylIntoCameraMessage indicating that the user should look directly into the cameraLook directly into the camera
faceCapture.onlyOneFaceShouldBeVisibleMessage indicating that only one face should be visible in the frameOnly one face should be visible
faceCapture.keepStillMessage indicating that the user should keep stillKeep still
documentVerification.helpButtonTooltipTooltip text for the help buttonNeed help?
documentVerification.helpButtonBackText for the back button in the help sectionBack
documentVerification.helpButtonNextText for the next button in the help sectionNext
documentVerification.helpButtonDoneText for the done button in the help sectionDone
documentVerification.helpButtonStartScanningText for the start scanning button in the help sectionStart Scanning
documentVerification.helpDocInfoTitleTitle for the document information help sectionKeep all the details visible
documentVerification.helpDocInfoDescriptionDescription for the document information help sectionMake sure you keep the document well lit. All document fields should be visible on the camera screen.
documentVerification.helpDocKeepDetailsVisibleTitleTitle for the keep details visible help sectionKeep all the details visible
documentVerification.helpDocKeepDetailsVisibleDescriptionDescription for the keep details visible help sectionMake sure you aren't covering parts of the document with a finger, including the bottom lines. Also, watch out for hologram reflections that go over the document fields.
documentVerification.helpDocAvoidHarshLightTitleTitle for the avoid harsh light help sectionWatch out for harsh light
documentVerification.helpDocAvoidHarshLightDescriptionDescription for the avoid harsh light help sectionAvoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can't read data on the document, it won't be visible to the camera either.
documentVerification.helpDocKeepStillTitleTitle for the keep still help sectionKeep still while scanning
documentVerification.helpDocKeepStillDescriptionDescription for the keep still help sectionTry to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable.
documentVerification.initializationErrorMessage displayed when there is an initialization errorFailed to load component. Try using another device or update your browser.
documentVerification.cameraDisabledMessage displayed when the camera is disabledCamera disabled.
documentVerification.cameraNotAllowedMessage displayed when camera access is not allowedCannot access camera.
documentVerification.cameraInUseMessage displayed when the camera is in useCamera is already used by another application.
documentVerification.cameraGenericErrorGeneric error message for camera issuesCannot access camera.
documentVerification.cameraFeedbackScanFrontFeedback message for scanning the front of the documentScan the front side of a document
documentVerification.cameraFeedbackScanBackFeedback message for scanning the back of the documentScan the back side of a document
documentVerification.cameraFeedbackFlipFeedback message for flipping the documentFlip to the back side
documentVerification.cameraFeedbackBarcodeMessageFeedback message for barcode scanningScan the barcode
documentVerification.cameraFeedbackMoveFartherFeedback message to move the camera fartherMove farther
documentVerification.cameraFeedbackMoveCloserFeedback message to move the camera closerMove closer
documentVerification.cameraFeedbackAdjustAngleFeedback message to adjust the camera angleAdjust the angle
documentVerification.cameraFeedbackBlurFeedback message for blurry imagesKeep still
documentVerification.cameraFeedbackGlareFeedback message for glare issuesTilt or move document to remove reflections
documentVerification.cameraFeedbackWrongSideFeedback message for scanning the wrong side of the documentFlip the document
documentVerification.cameraFeedbackFacePhotoCoveredFeedback message when the face photo is coveredKeep face photo fully visible
documentVerification.cameraFeedbackBarcodeFeedback message for barcode issuesScan the barcode
documentVerification.checkInternetConnectionMessage to check the internet connectionCheck internet connection.
documentVerification.networkErrorMessage displayed when there is a network errorNetwork error.
documentVerification.scanningNotAvailableMessage displayed when scanning is not availableScanning not available.
documentVerification.modalWindowCloseText for the close button in modal windowsClose

If you wish to add custom translations into your application, you need to pass create an object which will contain all of the above mentioned properties, and pass it to the SDK as translationsOverride property.

_ Keep in mind _, properties defined above which have a dot in their name correspond to nested properties in the object. For example, actions.done property in the object should be defined as:

const customTranslations = {
actions: {
done: 'Fertig',
},
};

If you're using TypeScript, you can use the following interface to define your custom translations:


// If you're using React version
import { TranslationMessages } from '@microblink/platform-sdk/react';

// Or vanilla one
import { TranslationMessages } from '@microblink/platform-sdk/vanilla';


const germanTranslations: TranslationMessages = {
actions: {
done: 'Fertig',
tryAgain: 'Erneut versuchen',
start: "Los geht's",
continue: 'Weiter',
exit: 'Beenden',
},
// Rest of properties...
};

After you've defined all of the properties, you can pass the object to the SDK as translationsOverride property as shown in the example above.

React

<IdvFlow
/* Other properties... */
translationsOverride={germanTranslations}
/>

Vanilla

createIdvFlow({
proxyConfig: {
url: '{url-to-your-proxy-service}',
},
workflowId: '{id-of-workflow-to-use}',
translationsOverride: germanTranslations,
});