Skip to main content

Overview

This page covers advanced vendor-specific customization options for styling, theming, and configuration that go beyond the basic provider options documented on each module’s page. For basic provider options such as sdkVersion, showExitButton, crossDevicePolicy, fallback, and biometricsVariant, refer to the individual module pages:

Onfido

SDK Version Selection

The sdkVersion property on the Onfido provider object controls which Onfido SDK version is loaded at runtime. By default, OneSdk uses Onfido v12 for backward compatibility. You can switch to a newer version by setting sdkVersion in the provider configuration for any module that uses Onfido (IDV, OCR, or Biometrics).
const sdk = await OneSdk({
  session: sessionObjectFromBackend,
  mode: 'production',
  recipe: {
    idv: {
      provider: {
        name: 'onfido',
        sdkVersion: '14'
      }
    },
    ocr: {
      provider: {
        name: 'onfido',
        sdkVersion: '14'
      }
    },
    biometrics: {
      provider: {
        name: 'onfido',
        sdkVersion: '14'
      }
    }
  }
});
Refer to the Onfido SDK changelog for the latest available version.

Custom UI Styling (customUI)

Onfido provides extensive styling capabilities to customize the verification UI to match your application’s design. Apply custom styling by setting the customUI property on the Onfido provider object for any module (IDV, OCR, or Biometrics).

All Available Properties

type OnfidoCustomUIProps = {
  // Borders & Shapes
  borderRadiusButton?: string;
  borderStyleSurfaceModal?: string;

  // Typography
  fontWeightBody?: number;
  fontSizeBody?: string;
  fontSizeSubtitle?: string;
  fontSizeTitle?: string;

  // Background Colors
  colorBackgroundSurfaceModal?: string;
  colorBackgroundIcon?: string;
  colorBackgroundDocTypeButton?: string;
  colorBackgroundDocTypeButtonHover?: string;
  colorBackgroundDocTypeButtonActive?: string;
  colorBackgroundSelector?: string;
  colorBackgroundInfoPill?: string;
  colorBackgroundInput?: string;

  // Button Colors - Primary
  colorBackgroundButtonPrimary?: string;
  colorBackgroundButtonPrimaryHover?: string;
  colorBackgroundButtonPrimaryActive?: string;
  colorContentButtonPrimaryText?: string;

  // Button Colors - Secondary
  colorBackgroundButtonSecondary?: string;
  colorBackgroundButtonSecondaryHover?: string;
  colorBackgroundButtonSecondaryActive?: string;
  colorContentButtonSecondaryText?: string;

  // Button Colors - Tertiary
  colorContentButtonTertiaryText?: string;

  // Content / Text Colors
  colorContentBody?: string;
  colorContentTitle?: string;
  colorContentSubtitle?: string;
  colorContentDocTypeButton?: string;
  colorContentInfoPill?: string;
  colorContentInput?: string;

  // Link Colors
  colorBorderLinkUnderline?: string;
  colorBackgroundLinkActive?: string;
  colorBackgroundLinkHover?: string;
  colorContentLinkTextHover?: string;

  // Border Colors
  colorBorderDocTypeButton?: string;
  colorBorderInput?: string;
  colorInputOutline?: string;

  // Icons
  colorIcon?: string;
}

Full Property Reference

PropertyTypeCategoryDescription
borderRadiusButtonstringBordersBorder radius for buttons (e.g., '8px')
borderStyleSurfaceModalstringBordersBorder style for the modal surface (e.g., '1px solid #E4E7EC')
fontWeightBodynumberTypographyFont weight for body text (e.g., 400)
fontSizeBodystringTypographyFont size for body text (e.g., '16px')
fontSizeSubtitlestringTypographyFont size for subtitles (e.g., '18px')
fontSizeTitlestringTypographyFont size for titles (e.g., '24px')
colorBackgroundSurfaceModalstringBackgroundBackground color of the modal surface
colorBackgroundIconstringBackgroundBackground color of icons
colorBackgroundDocTypeButtonstringBackgroundBackground color of document type buttons
colorBackgroundDocTypeButtonHoverstringBackgroundBackground color of document type buttons on hover
colorBackgroundDocTypeButtonActivestringBackgroundBackground color of document type buttons when active
colorBackgroundSelectorstringBackgroundBackground color of selector elements
colorBackgroundInfoPillstringBackgroundBackground color of info pill elements
colorBackgroundInputstringBackgroundBackground color of input fields
colorBackgroundButtonPrimarystringButtons (Primary)Background color of primary buttons
colorBackgroundButtonPrimaryHoverstringButtons (Primary)Background color of primary buttons on hover
colorBackgroundButtonPrimaryActivestringButtons (Primary)Background color of primary buttons when active
colorContentButtonPrimaryTextstringButtons (Primary)Text color of primary buttons
colorBackgroundButtonSecondarystringButtons (Secondary)Background color of secondary buttons
colorBackgroundButtonSecondaryHoverstringButtons (Secondary)Background color of secondary buttons on hover
colorBackgroundButtonSecondaryActivestringButtons (Secondary)Background color of secondary buttons when active
colorContentButtonSecondaryTextstringButtons (Secondary)Text color of secondary buttons
colorContentButtonTertiaryTextstringButtons (Tertiary)Text color of tertiary buttons
colorContentBodystringContentText color for body content
colorContentTitlestringContentText color for titles
colorContentSubtitlestringContentText color for subtitles
colorContentDocTypeButtonstringContentText color for document type buttons
colorContentInfoPillstringContentText color for info pill elements
colorContentInputstringContentText color for input fields
colorBorderLinkUnderlinestringLinksBorder color for link underlines
colorBackgroundLinkActivestringLinksBackground color of active links
colorBackgroundLinkHoverstringLinksBackground color of hovered links
colorContentLinkTextHoverstringLinksText color of hovered links
colorBorderDocTypeButtonstringBordersBorder color of document type buttons
colorBorderInputstringBordersBorder color of input fields
colorInputOutlinestringBordersOutline color of focused input fields
colorIconstringIconsColor of icons

Code Example

const sdk = await OneSdk({
  session: sessionObjectFromBackend,
  mode: 'production',
  recipe: {
    ocr: {
      provider: {
        name: 'onfido',
        sdkVersion: '14',
        theme: 'dark',
        customUI: {
          // Typography
          fontWeightBody: 400,
          fontSizeBody: '16px',
          fontSizeSubtitle: '18px',
          fontSizeTitle: '24px',

          // Background
          colorBackgroundSurfaceModal: '#1A1A2E',
          colorBackgroundButtonPrimary: '#E94560',
          colorBackgroundButtonPrimaryHover: '#D63B56',
          colorBackgroundButtonPrimaryActive: '#C3314C',

          // Text
          colorContentBody: '#EAEAEA',
          colorContentTitle: '#FFFFFF',
          colorContentSubtitle: '#CCCCCC',
          colorContentButtonPrimaryText: '#FFFFFF',

          // Borders
          borderRadiusButton: '8px',
          colorBorderInput: '#333366',
          colorInputOutline: '#E94560',
        }
      }
    },
    biometrics: {
      provider: {
        name: 'onfido',
        sdkVersion: '14',
        theme: 'dark',
        customUI: {
          colorBackgroundButtonPrimary: '#E94560',
          colorContentButtonPrimaryText: '#FFFFFF',
          borderRadiusButton: '8px',
        }
      }
    }
  }
});

Theme Option

Onfido v14 introduces a theme option that can be set on the provider object. The available values are 'light' (default) and 'dark'.
provider: {
  name: 'onfido',
  sdkVersion: '14',
  theme: 'dark'
}
The theme option provides a base light or dark appearance. You can further customize individual elements using customUI properties on top of the chosen theme.
Refer to Onfido’s customUI styling documentation for the full list of supported styling keys and visual examples.

Document and Country Configuration

You can configure which document types and countries are accepted during document capture by providing a documents array in the recipe configuration. This applies to both the IDV and OCR modules when using Onfido. By default, if no documents configuration is provided, the Onfido selection screen is shown with all supported document types and an empty country selection. Depending on the configuration:
  • The country selection screen will not be shown if only one country is specified or if only passports are allowed
  • The document selection screen will not be shown if only one document type is specified
const sdk = await OneSdk({
  session: sessionObjectFromBackend,
  mode: 'production',
  recipe: {
    idv: {
      documents: [
        {
          type: 'PASSPORT',
          countries: ['NZL'],
        },
        {
          type: 'DRIVERS_LICENCE',
          countries: ['NZL'],
        },
      ],
      provider: {
        name: 'onfido'
      }
    }
  }
});

const idv = sdk.flow('idv');
idv.mount('#idv-container');
If you specify different countries for different document types (for example, 'NZL' for passports and 'SGP' for driver’s licences), Onfido will fall back to displaying the full selection screen with all supported documents. Ensure all document types share the same country list to control the selection screens as expected.

Exit Button and User Exit Handling

The showExitButton property (defaults to false) displays an exit button in the Onfido verification UI. When the user clicks the exit button, a vendor_event event is emitted with the event name OCR:ONFIDO:ON_USER_EXIT.
const idv = sdk.flow('idv', {
  provider: {
    name: 'onfido',
    showExitButton: true
  }
});

// Listen for exit events
idv.on('vendor_event', (obj) => {
  if (obj.eventName === 'OCR:ONFIDO:ON_USER_EXIT') {
    console.log('User clicked exit button');
    // Handle exit (e.g., save progress, show confirmation)
  }
});

idv.mount('#idv-container');

Error Codes

OneSdk surfaces Onfido-specific errors through the onError callback. The following table lists Onfido error codes, their meaning, and recommended recovery actions.
Error CodeDescriptionRecommended Recovery
invalid_tokenThe Onfido IDV token is invalid.Re-generate the IDV token by remounting the component.
expired_tokenThe Onfido IDV token has expired.Re-generate the IDV token by remounting the component.
expired_trialThe Onfido trial period has expired.This is an unexpected error. Contact support if you encounter this.
geoblocked_requestThe request is not allowed from this geographic location.The end user may be in a restricted region. Disable any active VPN and retry, or contact support for details.
permissions_unavailableUnable to retrieve or access required user permissions.This may occur when the SDK is loaded in a WebView or custom browser. Try using a standard browser.
unsupportedA module is not supported in the current environment.Check the documentation for supported environments and features, or contact support.
unsupported_featureThe requested feature is no longer supported.Check the documentation for current supported features, or contact support.
invalid_sdk_parameterThe SDK was initialized with invalid parameters.Review the initialization parameters for correctness.
unsupported_sdk_versionThe workflow is not supported by the current SDK version.Update the sdkVersion parameter to a supported version.
no_cameraNo camera is available and no other capture method is available.The user has not granted camera access or their device does not have a camera. Prompt the user to grant camera permissions.
user_consent_deniedThe user declined consent.The user must provide consent to proceed. Display a message explaining why consent is required and allow them to retry.

Incode

Style Customization

OneSdk uses Incode’s low-code approach for rendering the verification UI. To customize the appearance of the Incode integration, define custom CSS and work with the support team to apply it through the Incode portal.
Refer to Incode’s theming documentation for details on customizing the appearance.

SDK Version

The Incode SDK version can be set via the sdkVersion property on the provider object.
provider: {
  name: 'incode',
  sdkVersion: '1.0.0'
}
Check with Incode or the support team for the latest available SDK version.

Daon

Daon provides extensive visual customization options that are configured through the support team. Below are the customizable areas available.

Custom Colors

AreaDescription
GeneralOverarching theme colors that set the primary look and feel.
ButtonsColors for all button elements in the verification flow.
TextColors for all text displayed on the pages.
InputColors for interactive input elements such as search boxes.
Country SelectionColor scheme for the country selection screen.
Document SelectionColor scheme for the document selection screen.
Document CaptureColor scheme for the document capture screen.
Face CaptureColor scheme for the face capture screen.
HeaderColor scheme for page headers.
StepperColor scheme for the left-side step list displayed on desktop.
Progress BarColor of the progress bar.
OtherColor of icons on the intro screen and preview borders.

Icons

IconDescription
LogoThe main logo displayed at the top of the app page.
Mobile Switch IconThe icon shown on the “Switch to your phone” step.
Consent IconThe icon shown on the “Consent” step.
Face Capture IconThe icon shown on the “Selfie” step.
Document Capture IconThe icon shown on the document capture screen.
Additional Documents IconThe icon shown on the additional document capture screen.
Custom Form IconThe icon shown on the custom form screen.

Fonts

Font StyleDescription
Regular FontUsed for general body text displayed to the end user.
Medium FontUsed for medium-weight text such as sub-titles.
Bold FontUsed for bold text such as headings.

Media

Daon themes support uploading custom images for capture instruction and processing screens. Supported file types: .jpg, .png, .jpeg, .svg, .gif, .mp4, .webm. Maximum file size is 5MB per asset.
Media AssetDescription
Document Capture Instructions FrontImage shown on the front document capture instructions screen.
Document Capture Instructions BackImage shown on the back document capture instructions screen.
Face Capture InstructionsImage shown on the face capture instructions screen.
Manual Capture Instructions FrontImage shown on the front manual capture instructions screen.
Manual Capture Instructions BackImage shown on the back manual capture instructions screen.
Switch To Mobile WaitingImage shown on the desktop while the user completes the flow on mobile.
Processing Screen Image FrontImage shown during the front-facing processing capture screen.
Processing Screen Image BackImage shown during the back-facing processing capture screen.
To apply Daon visual customizations, contact the support team with your desired assets, colors, fonts, and icons.

Sumsub

Sumsub provides customization options through its SDK configuration, including theme selection ('light' or 'dark'), language settings, and iframe behavior options. These basic options are documented on the IDV Module, OCR Module, and Biometrics Module pages. For advanced visual customization (colors, fonts, branding), refer to the Sumsub Web SDK customization documentation.

Truuth

Truuth provides customization options through its provider configuration. For details on available customization options such as theming and branding, refer to the Truuth documentation or contact the support team.