Skip to content

Vida Liveness

Vida Liveness

Vida Liveness is a selfie liveness detection component that guides users through a multi-step flow — instructions, camera capture, and preview verification — using the Vida SDK for biometric authentication.

PropertyValue
Background#FFFFFF (tselWhite)
Padding16px vertical, 20px horizontal (40px @1280px+)
Gap20px
Shadow0px 4px 14px 0px #0000000F
Back Button Size24×24px
Title Font20px bold (16px @1280px+), #001A5C (darkBlue)
Title Max Width464px (@1280px+)
Spacer Width24px
PropertyValue
Background#F8FAFC (container), #FFFFFF (content card)
Padding20px
Gap12px
Border Radius10px (top corners)
Max Width600px (@768px+)
Height100dvh
ElementWidth
Main Instruction Image280px
Warning Image231px
No Accessories Image242px
PropertyInfo BannerInfo Error
Background#EEEFF1#FFE6E9
Text Color#000C1F#D32F2F
Font Size14px14px
Line Height20px20px
Padding12px horizontal, 8px vertical12px horizontal, 8px vertical
Border Radius8px8px
PropertyValue
Aspect Ratio3:4
Max Height400px
Border Radius16px
Image Fitobject-cover
PropertyValue
Background#FFFFFF
Padding20px horizontal, 8px top, 20px + safe-area bottom
Max Width600px (@768px+)
PropertyPrimary ButtonOutline Button
Background#D6001Ctransparent
Text Color#FFFFFF#D6001C
Bordernone2px solid #FF0025
Border Radius80px mobile / 56px desktop80px mobile / 56px desktop
Height45px mobile / 40px desktop45px mobile / 40px desktop
Font14px bold14px bold
Disabled Style#E0E0E0 bg, cadetBlue text—
PropertyValue
Size16×16px
Border Width2px
Animationspin 0.6s linear infinite
PropertyValue
Background#000000 (tselBlack)
Max Width600px (@768px+)
Height90svh
Video Border Radius16px mobile / 8px desktop
Video Max (desktop)504×374px

Instruction visuals shown with a continue button. Button disabled until token is available.

Instructions State

Active camera capture via Vida SDK rendered into #sdk-container.

Camera State

Captured selfie shown in preview frame with verify and retake actions.

Preview State
OptionTypeDefaultDescription
configHeader.backButtonbooleanfalseShow back button in header
configHeader.titlestring''Header title text
tokenstringnullVida SDK authentication token
step’instructions’ | ‘camera’ | ‘preview’'instructions'Current flow step
selfiePreviewstringnullCaptured selfie image data URL
errorMessagestringnullValidation or capture error message
isVerifyingbooleanfalseShows spinner during verification
BehaviorDescription
Step FlowInstructions → Camera → Preview
Token GateContinue button disabled when token missing
Camera InitSDK loads into #sdk-container on camera step
Capture ResultSelfie stored in selfiePreview, advances to preview
Verify ActionTriggers verification with loading spinner
Retake ActionReturns to camera step for new capture
Error DisplayerrorMessage shown below preview frame
Back NavigationOptional back button calls handleBack()
ScreenLayout
DesktopCentered content, max-width 480px
TabletFull-width with padding
MobileFull-width, camera fills viewport
  • Identity verification flows
  • KYC (Know Your Customer) processes
  • Biometric authentication
  • Account recovery with liveness check
  • Fraud prevention in onboarding
✅ Do❌ Don’t
Provide clear instruction visualsLaunch camera without guidance
Disable continue until token readyAllow capture without valid token
Show loading state during verifyLeave verify button without feedback
Offer retake optionForce single capture attempt
Display specific error messagesShow generic or unclear errors
Handle camera permission denialAssume camera always available
Support multiple languagesHardcode instruction text
  • Camera permission prompts announced to screen readers
  • Keyboard-navigable buttons with visible focus indicators
  • Descriptive alt text for instruction and preview images
  • Error messages associated with relevant UI regions
  • Loading state communicated via aria-live for spinner
  • Back button uses type="button" to prevent form submission
RequirementDescription
Vida SDKLoaded into #sdk-container div
Auth TokenRequired before enabling capture
Translate Pipei18n keys under vidaLiveness.selfieCapture.*
AssetsInstruction images in assets/images/swafoto-instruction-*.png
IconsBack arrow in assets/icons/arrow-left-tail.svg

View in Storybook →