Customization through API
The SDKUIComponentConfig struct lets you adapt the UI of the full liveness flow to match your app's branding — screen background colors, text colors, fonts, and camera overlay
styling. This page lists every option by screen, then covers how to enable active liveness gestures.
UI Customization Options
Tutorial Screen

The initial tutorial screen shown before capture, including the transaction ID label, instructions, and "avoid wearing these" warning.
tutorialScrBackgroundColor
UIColor
White
Background color of the tutorial screen.
tutorialScrTextColor
UIColor
Black
Text color of the tutorial screen.
tutorialInstructionTextColor
UIColor
Black
Text color of the on-screen instruction.
tutorialWarningTextColor
UIColor
Black
Text color of the warning message.
tutorialWarningIconTextColor
UIColor
rgb(0.49, 0.51, 0.53)
Text color of the warning icon labels.
transactionIdBackgroundColor
UIColor
rgb(0.95, 0.95, 0.95)
Background color of the transaction ID label.
transactionIdTextColor
UIColor
rgb(0.51, 0.51, 0.51)
Text color of the transaction ID label.
Camera Permission Screen

The screen that requests camera permission from the user.
cameraPermissionTitleText
String
-
Title text of the camera permission screen.
cameraPermissionDescriptionText
String
-
Description text on the camera permission screen.
cameraPermissionScrBackgroundColor
UIColor
Black
Background color of the camera permission screen.
cameraPermissionScrTextColor
UIColor
Black
Text color of the camera permission screen.
Camera Preview Screen

The live camera preview, including the face overlay and its border.
cameraPreviewScrBackgroundColor
UIColor
White
Background color of the camera preview screen.
overlayBackgroundColor
UIColor
Black, 70% opacity
Background color of the camera overlay.
overlayBorderColor
UIColor
White
Border color of the camera overlay.
overlayBorderWidth
CGFloat
10
Border width of the camera overlay.
overlayShape
OverlayShape
.oval
Shape of the camera overlay (see Overlay shape below).
Camera Capture Screen (messaging)
The messages and animation stroke shown during face capture.
strokeBorderColor
UIColor
rgb(0.03, 1, 0.72)
Stroke border color for elements on the camera capture screen
(the animation stroke).
cameraMessageTextColor
UIColor
Black
Text color for messages on the camera capture screen.
cameraMessageFont
UIFont
HelveticaNeue-Bold, 16
Font for messages on the camera capture screen.
Review Screen

The screen that lets the user review the captured photo before submitting.
reviewScreenBackgroundColor
UIColor
White
Background color of the review screen.
reviewScreenTextColor
UIColor
Black
Text color of the review screen.
reviewInstructionTextColor
UIColor
rgb(0.617, 0.633, 0.667)
Instruction text color on the review screen.
reviewInstructionFont
UIFont
HelveticaNeue, 15
Instruction font on the review screen.
Call-to-Action buttons
Configure the primary and secondary CTA buttons used across the whole liveness flow. Each takes a CTAConfig:
primaryCTAConfig
CTAConfig
bg rgb(0.35, 0.74, 0.95), white text, HelveticaNeue-Bold 15
Primary call-to-action button.
secondaryCTAConfig
CTAConfig
bg rgb(0.95, 0.95, 0.95), black text, HelveticaNeue 15
Secondary call-to-action button.
Overlay shape
Set the shape of the camera overlay with the overlayShape option (default .oval). Available shapes:
.oval
Oval overlay (default).
.circle
Circular overlay.
.square
Square overlay.
.rectangle
Rectangular overlay.
Other options
maxRetryAttempts
Int
2
Maximum number of retry attempts allowed.
Full Initializer Reference
The complete SDKUIComponentConfig initializer with all default values:
Active Liveness
By default, active liveness is not enabled. You can enable gesture-based active liveness (Blink, Smile, Shake) by updating your detectionOptions configuration.
Enable active liveness
Update VIDAFaceDetectionOptions to turn on active liveness and provide the list of allowed gestures:
Allowed gestures
.zoomFace
Enables the zoom gesture.
.blinkEyes
Blink gesture.
.smile
Smile gesture.
.shakeHead
Shake-head gesture.
.blinkEyes , .smile , and .shakeHead can be configured individually or in combination. If active liveness is enabled and allowedGestures is not passed, the default gesture is
.zoomFace.
Apply the Configuration
Pass the updated sdkUIComponentConfig and detectionOptions into the vidaLiveness.initialize call:
Last updated
