Customize the scanning UI
The BlinkCard scanning UI is configurable on every platform.
On the web, the UI is configured through two option groups passed to createBlinkCard:
feedbackUiOptions: the scanning feedback layer (onboarding, help, timeout modal, instruction text)cameraManagerUiOptions: the camera controls (torch, close, mirror buttons, and layering)
On Android and iOS, the UI is configured through settings objects passed to the scanning entry point.
Where the UI is mounted (web)
By default the UI mounts full-screen into document.body.
To embed it inside your own layout, pass targetNode:
const blinkCard = await createBlinkCard({
licenseKey: "your-license-key",
targetNode: document.getElementById("scanner-container") ?? undefined,
});
When you provide a targetNode, the UI fills that element instead of the whole screen, so it sits within your page's branding.
Onboarding and help
Toggle the onboarding guide shown before scanning starts and the help button shown during scanning.
- Web (JS)
- Android (Kotlin)
- iOS (Swift)
On the web, these live in feedbackUiOptions, passed to createBlinkCard.
const blinkCard = await createBlinkCard({
licenseKey: "your-license-key",
feedbackUiOptions: {
showOnboardingGuide: false,
showHelpButton: false,
showTimeoutModal: true,
helpTooltipShowDelay: 5000,
helpTooltipHideDelay: 5000,
},
});
showOnboardingGuide: show the onboarding guide before scanning starts (defaulttrue)showHelpButton: show the help button (defaulttrue)helpTooltipShowDelay: milliseconds before the help tooltip appears automatically, ornullto never auto-show (default5000)helpTooltipHideDelay: milliseconds before the help tooltip auto-hides, ornullto never auto-hide (default5000)showTimeoutModal: show the modal when scanning times out (defaulttrue)
On Android, the onboarding dialog and help button are part of UiSettings, passed to BlinkCardCameraScanningScreen via its uiSettings parameter.
BlinkCardCameraScanningScreen(
blinkCardSdk = blinkCardSdk,
uiSettings = UiSettings(
showOnboardingDialog = false,
showHelpButton = false,
),
onScanningSuccess = { result -> /* handle result */ },
onScanningCanceled = { /* handle cancel */ },
)
showOnboardingDialog: show an onboarding dialog at the beginning of the scanning session (defaulttrue)showHelpButton: show the help button and enable help screens during scanning (defaulttrue)
On iOS, these are part of ScanningUXSettings, passed to BlinkCardUXModel(analyzer:uxSettings:).
let uxSettings = ScanningUXSettings(
showIntroductionAlert: false,
showHelpButton: false
)
let blinkCardUXModel = BlinkCardUXModel(analyzer: analyzer, uxSettings: uxSettings)
showIntroductionAlert: show the alert displayed when scanning starts (defaulttrue)showHelpButton: show the help button that raises an onboarding sheet (defaulttrue)
Camera controls
- Web (JS)
- Android (Kotlin)
- iOS (Swift)
On the web, the camera controls live in cameraManagerUiOptions.
const blinkCard = await createBlinkCard({
licenseKey: "your-license-key",
cameraManagerUiOptions: {
showTorchButton: true,
showCloseButton: true,
showMirrorCameraButton: false,
showCameraErrorModal: true,
},
});
showTorchButton: show the torch (flashlight) toggle when the device supports it (defaulttrue)showCloseButton: show the close button (defaulttrue)showMirrorCameraButton: show the mirror-camera button (defaultfalse)showCameraErrorModal: show a modal on camera errors such as denied permission (defaulttrue)zIndex: the stacking order when the UI renders as a full-screen overlay (only applies when notargetNodeis set)
On Android, the scanning UX behavior is configured through BlinkCardUxSettings, passed to BlinkCardCameraScanningScreen via its uxSettings parameter.
BlinkCardCameraScanningScreen(
blinkCardSdk = blinkCardSdk,
uxSettings = BlinkCardUxSettings(
stepTimeoutDuration = 15000.milliseconds,
allowHapticFeedback = true,
),
onScanningSuccess = { result -> /* handle result */ },
onScanningCanceled = { /* handle cancel */ },
)
stepTimeoutDuration: duration of the scanning session before a timeout is triggered; resets when scanning is paused, such as on dialogs or a side change (default 15 seconds)allowHapticFeedback: whether haptic feedback is played during scanning (defaulttrue)
Visual aspects of the camera UI, such as the color scheme, typography, and help-button colors, are configured through UiSettings.
See the BlinkCard Android repository for the full set of theming options.
On iOS, camera behavior is configured through ScanningUXSettings.
let uxSettings = ScanningUXSettings(
preferredCameraPosition: .back,
allowHapticFeedback: true
)
let blinkCardUXModel = BlinkCardUXModel(analyzer: analyzer, uxSettings: uxSettings)
preferredCameraPosition: the preferred camera position to use when capturing the document,.backor.front(default.back)allowHapticFeedback: whether haptic feedback is played for scanning-related events, such as detection updates or toggling the flashlight (defaulttrue)
Customize the instruction text
- Web (JS)
- Android (Kotlin)
- iOS (Swift)
On the web, both option groups accept localizationStrings to override the on-screen messages.
Pass only the keys you want to change; the rest fall back to the built-in copy.
const blinkCard = await createBlinkCard({
licenseKey: "your-license-key",
feedbackUiOptions: {
localizationStrings: {
flip_card: "Turn the card over",
},
},
});
To translate the whole UI into another language, override the full set of strings. The SDK ships with several built-in locales; see Supported languages.
On Android, the scanning strings are provided through the sdkStrings property of UiSettings.
The SDK ships with localized Android string resources, and you override individual strings by supplying your own SdkStrings.
See the BlinkCard Android repository for the available strings.
On iOS, the scanning strings are loaded from bundled .strings resources keyed by identifiers such as mb_accessibility_success_card_scanned.
Override them by providing your own localized strings for those keys in your app bundle.
See the BlinkCard iOS repository for the localization approach.