Skip to main content

Customizing the UI

The Veriph.One SDK is configurable so that the interfaces shown to your users match your app's branding. To make this customization happen, you'll need an active API Key registered in the Veriph.One dashboard and start by clicking on it to show its details; then, scroll down to find the styling section, as shown below.

You'll find a placeholder text with a sample JSON for new API Keys or those without style customizations; this text is only an example, and the values aren't affecting the UI.

tip

Start by deleting the comments at the top of the sample JSON; its specification does not support them.

Step 1: Create your styling JSON

A valid JSON string with the necessary fields is needed to customize your UI. Many fields are optional, so you can change only the ones you need.

FieldDescriptionTypeNullable
paletteControls the colors used for the UIUIPalette[]Yes
typographyUsed to customize the appearance of text elementsUITypographyYes
layoutDefines the structure and style of base elementsUILayoutYes
note

Please consider that the palette property expects an array because we intend to support light and dark palette schemes in the future. Currently, however, the UI will only use the first element of the array.

UIPalette

PropertyDescriptionTypeNullable
modeDefines the type of palette (light or dark)String constant (values: "light" or "dark")No
primaryPrimary accent color for interaction elementsUIColorYes
secondary*Secondary color for contrast and emphasisUIColorYes
textConfigures the base of colors of text elementsUITextColorYes
backgroundBase colors for the UI's backgrounds and layoutsUIBgColorYes
note

[*] The secondary color is currently unused. If you would like to use multiple accent controls in your integration; please let us know.

UIColor

PropertyDescriptionTypeNullable
mainPrimary accent color for interaction elementsString with hex value (e.g. #FFFF00)Yes
contrastTextColor of text used over main color (e.g. buttons)String with hex value (e.g. #FFFF00)Yes

UITextColor

PropertyDescriptionTypeNullable
primaryColor used for bold or emphasis text in Web, and all non-interactive texts in mobile platforms.String with hex value (e.g. #FFFF00)Yes
secondaryColor for generic and any non-interactive text. Ignored by Android and iOS SDK's, used by Web only.String with hex value (e.g. #FFFF00)Yes

UIBgColor

PropertyDescriptionTypeNullable
paperWeb SDK: Color used for container cards and similar surfaces.
iOS SDK: Used for TextField and Picker backgrounds.
Android SDK: Unused.
String with hex value (e.g. #FFFF00)Yes
defaultWeb SDK: Website's default background color (rendered below background image, if any).
Mobile SDKs: Used as window, sheet, and dialog backgrounds.
String with hex value (e.g. #FFFF00)Yes

UITypography

PropertyDescriptionTypeNullable
h3Defines the style of titles in the UI.UITextStyleYes
h4Legacy value. Unused in latest version of the SDK. Defines the style of subtitle elements.UITextStyleYes

UITextStyle

PropertyDescriptionTypeNullable
colorColor used for a specific type of textString with hex value (e.g. #FFFF00)Yes

UILayout

PropertyDescriptionTypeNullable
backgroundWeb SDK: Image used as the website's background.
Mobile SDKs: Unused element.
UIBackgroundYes
logoImage used to show the client's logo in the verification UI.UIImageYes
tip

Our UI draws the background image on top of the background color that you configure in the palette field.

UIBackground

PropertyDescriptionTypeNullable
typeDefines the type of resource usedString constant (values: "url")No
sourceValid URL or URI to obtain the assetString (URL starting with http or https)No

UIImage

PropertyDescriptionTypeNullable
typeDefines the type of resource usedString constant (values: "url")No
sourceValid URL or URI to obtain the assetString (URL starting with http or https)No

Step 2: Test your configuration

Once you submit your JSON string and save your configuration, each new verification session you open using that API Key will have the style you specified.

You can test your customization using a non-production API Key to ensure everything works as expected. Later, you can copy and paste the JSON string to your production environment Key, and the customization will carry over.