Skip to main content

Themes

Unit's White-label UIs support multiple Themes. In order to create a new Theme, you would need to upload a JSON that contains the White-label settings associated with that theme via an API. In response, you will get a URL. You will then specify that URL as you initialize any UI Component, under the theme attribute.

The best way to understand how to use the White-label Themes is to see them in action. Try out the Component Preview page in order to make a Component look and feel like your brand. Once you are happy with the result, you can copy the JSON settings from under the 'Appearance Config' tab in the preview page, and create the theme by uploading the JSON to the API.

After creating the theme, you can use the link from the response to apply the theme to UI components. Here's an example with an account component:

<unit-elements-account
account-id="12345"
customer-token="{{customerToken}}"
theme="https://ui.s.unit.sh/resources/1/themes/291ccb0e-9447-4010-98ef-0b9bf0fd04dc.json"
></unit-elements-account>

Customization Options

The settings that make up a theme are divided into two main categories - global settings and component specific settings.

  • Global settings are meant to reflect your brand's design system - colors, fonts, basic component look and feel.
  • Component specific settings are meant to allow you to control UI Elements that are unique to a specific Component (e.g. the color of the font on a card image). On the component specific level, you may also provide overrides to any parameter specified in the global settings.
Note

Please reach out to Unit if you need additional customization options to support your brand.

Global Settings

  • This object located on the root of the theme JSON object, but it can also be overridden on the component level.
NameTypeDescription
logoUrl RequiredstringURL to a logo image.
faviconUrl RequiredstringURL to a favicon image.
colors RequiredobjectColor palette
typography RequiredobjectTypography (text) preferences
buttons Requiredobjectbuttons states preferences
menuButton Requiredobjectmenu-button states preferences
menu Requiredobjectmenu preferences
anchorButton Requiredobjectanchor button preferences
avatar Requiredobjectavatar preferences
cardIcon Requiredobjectcard icon preferences
sidebar Requiredobjectsidebar preferences
whiteLabelAppBox Requiredobjectapplication box preferences
whiteLabelAppHeader Requiredobjectapplication header preferences
admonition Requiredobjectadmonition (alert) preferences
chip Requiredobjectchip preferences
box Requiredobjectbox preferences
tabs Requiredobjecttab preferences
breadcrumbs Requiredobjectbreadcrumbs preferences
fields Requiredobjectform field preferences

Colors

NameTypeDescription
background RequiredstringWill be used as background color of the components, drop downs menus and inner flows.
primary RequiredstringWill be used for buttons, icons, highlight fields that are in focus, cover elements.
secondary RequiredstringThe secondary brand color is used for secondary buttons.
neutral RequiredstringWe will derive 6 neutral shades based on your main Neutral color. These shades will be used for texts, light background colors and disabled/inactive elements.
success RequiredstringSemantic. Will be used in messages, toasts, statuses and alerts.
warning RequiredstringSemantic. Will be used in messages, toasts, statuses and alerts.
error RequiredstringSemantic. Will be used in messages, toasts, statuses and alerts.

Typography

NameTypeDescription
common RequiredobjectCommon typography settings (running texts).
titles RequiredobjectTitles typography settings.

Common

NameTypeDescription
fontFamily RequiredstringFont family for Elements. Note, the Components components will not fetch the font. Font should be available on the page from which the Components are used.
fontSize RequiredstringFont size for elements. Can be set to either relative or absolute units.
rootFontSize RequiredstringSets the base font size, similar to applying font-size on :root or the "html" element. Affects text scaling and all relative-based units within the component.

Titles

NameTypeDescription
h2 RequiredTitleThe main title used in the Components. Examples include the Card title, Activity table title etc.
h3 RequiredTitleThe secondary title used in the Components. Examples include menus and empty states.
menuTitle RequiredTitleThe title used for mobile menus (card-menu, account-list menu, etc).
componentTitle RequiredTitleThe title applied to various components such as card and activity components.
bigNumber RequiredBigNumberThe title used for big number displays in components.
flow RequiredFlowThe titles used for a flow or series of steps in a component. (card-actions, payments flows, etc.)
response RequiredResponseThe titles used for a response or message in components.
emptyState RequiredEmptyStateThe titles displayed in empty states within component.
table RequiredTableThe titles for tables used in components.
Title
NameTypeDescription
fontWeight Required100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 950 , "normal" , "bold" , "bolder" , "lighter"The thickness or boldness of the font.
color RequiredstringThe color of the text in the title.
fontSize RequiredstringThe size of the font used in the title.
fontFamily RequiredstringThe specific font family for the title's text.
Big Number
NameTypeDescription
fontWeight Required100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 950 , "normal" , "bold" , "bolder" , "lighter"The thickness or boldness of the font.
color RequiredstringThe color of the text in the big number display.
fontFamily RequiredstringThe specific font family for the big number text.
largeFontSize RequiredstringThe font size for larger big number displays.
extraLargeFontSize RequiredstringThe font size for extra-large big number displays.
Flow
NameTypeDescription
title RequiredTitleThe main title for the flow.
subtitle RequiredTitleThe secondary title for the flow.
Response
NameTypeDescription
title RequiredTitleThe title for the response.

Empty State

NameTypeDescription
title RequiredTitleThe title displayed in the empty state.

Table

NameTypeDescription
headers RequiredTitleThe titles for the table headers.

Buttons

NameTypeDescription
fontWeight Required100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 950 , "normal" , "bold" , "bolder" , "lighter"Font weight for buttons. Omit to use the default.
primary RequiredButtonStatesThe primary style of the button.
secondary RequiredButtonStatesA secondary style option for the button.
subtle RequiredButtonStatesA subtle style option for the button.
outline RequiredButtonStatesAn outlined style option for the button.
flat RequiredButtonStatesA flat style option for the button.

Example:

{
"global": {
"buttons": {
"fontWeight": 600
}
}
}
NameTypeDescription
default RequiredButtonAttributesThe default style of the menu button.
hover RequiredButtonAttributesThe style when the button is hovered.
active RequiredButtonAttributesThe style when the button is active.
disabled RequiredButtonAttributesThe style when the button is disabled.

Button States

NameTypeDescription
default RequiredButtonAttributesThe default style of the menu button.
hover RequiredButtonAttributesThe style when the button is hovered.
active RequiredButtonAttributesThe style when the button is active.
disabled RequiredButtonAttributesThe style when the button is disabled.

Button Attributes

NameTypeDescription
border RequiredBorderThe border attributes for the button.
textColor RequiredstringThe color of the text in the button.
backgroundColor RequiredstringThe background color of the button.

Border

NameTypeDescription
width RequiredstringThe width of the border around the element.
radius RequiredstringThe border radius or curvature of the element's corners.
color RequiredstringThe color of the border around the element.

Controls the appearance of action menus across components (for example, card actions, account actions, and selection menus).

NameTypeDescription
actionItems RequiredobjectAction menu item preferences.
NameTypeDescription
fontWeight Required100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 950 , "normal" , "bold" , "bolder" , "lighter"Font weight for menu action items. Omit to use the default.

Example:

{
"global": {
"menu": {
"actionItems": {
"fontWeight": 600
}
}
}
}

Anchor Button

Controls the default color for anchor buttons (text-style link buttons) across components.

NameTypeDescription
defaultColor RequiredstringDefault color for anchor buttons. Accepted values: "primary", "neutral". Omit to use the default ("primary").

Example:

{
"global": {
"anchorButton": {
"defaultColor": "neutral"
}
}
}

Avatar

NameTypeDescription
iconColor RequiredstringWill control the color of the icon.
borderColor RequiredstringWill control the color of the border.
backgroundColor RequiredstringWill control the color of the background.

Card Icon

NameTypeDescription
backgroundColor RequiredstringWill control the color of the background.
visaTextColor RequiredstringWill control the color of the Visa text.

White Label App Box

Styles the container box used in application form flows.

NameTypeDescription
backgroundColor RequiredstringWill control the background color of the box.
borderRadius RequiredstringWill control the border radius of the box.
borderColor RequiredstringWill control the border color of the box.
boxShadow RequiredstringWill control the box shadow of the box.

White Label App Header

Styles the header used in application form flows.

NameTypeDescription
actions RequiredobjectHeader action preferences.

Actions

NameTypeDescription
fontSize RequiredstringWill control the font size of header actions.
iconSize RequiredstringWill control the icon size of header actions.

Controls the color palette for sidebars rendered by Components (for example, the stages sidebar in unit-elements-application-form or unit-elements-create-card). Setting this object re-derives the sidebar's text, border and icon colors from the seed colors, so a dark sidebar stays legible.

NameTypeDescription
colors RequiredobjectSidebar color palette.

Accepts the same shape as the top-level colors palette. The SDK derives the sidebar's text, border and icon colors from these seeds to preserve contrast.

NameTypeDescription
background RequiredstringWill be used as background color of the sidebar.
primary RequiredstringWill be used for primary elements inside the sidebar, such as the active step indicator.
secondary RequiredstringThe secondary brand color used inside the sidebar.
neutral RequiredstringWe will derive 6 neutral shades based on your main Neutral color. These shades will be used for sidebar texts, borders, icons and disabled/inactive elements.
info RequiredstringSemantic. Will be used in informational sidebar messages and statuses.
success RequiredstringSemantic. Will be used in sidebar messages, toasts, statuses and alerts.
warning RequiredstringSemantic. Will be used in sidebar messages, toasts, statuses and alerts.
error RequiredstringSemantic. Will be used in sidebar messages, toasts, statuses and alerts.

Example — theme-wide sidebar palette (applies everywhere a sidebar is shown):

{
"global": {
"sidebar": {
"colors": {
"primary": "#4F46E5",
"neutral": "#0B1020",
"background": "#0B1020"
}
}
}
}

To scope the palette to a single component (for example, only the Application Form sidebar), set the same object under that component's override.global.sidebar. See Application Form.

Admonition

Controls the appearance of admonition (alert) components used across White-label UIs — for example, informational, success, warning, and error callouts.

NameTypeDescription
borderWidth RequiredstringBorder width around the admonition. Accepts any valid CSS length value (for example, "1px"). Omit to use the default (no border).
hideBackground RequiredbooleanWhen true, removes the admonition background color so only the border and icon remain visible. Default is false.

Example:

{
"global": {
"admonition": {
"borderWidth": "1px",
"hideBackground": false
}
}
}

Chip

Controls the default rendering style for chip components (for example, status labels on accounts and cards).

NameTypeDescription
outline RequiredbooleanWhen true, chips render with an outlined style (border and transparent background) instead of a filled style. Default is false.

Example:

{
"global": {
"chip": {
"outline": true
}
}
}

Box

Controls the default rendering style for box (container) components.

NameTypeDescription
subtleToOutline RequiredbooleanWhen true, boxes with the subtle variant render as outlined containers (border with transparent background) instead of filled subtle boxes. Default is false.

Example:

{
"global": {
"box": {
"subtleToOutline": true
}
}
}

Tabs

Controls the appearance of tab navigation across components.

NameTypeDescription
activeColor RequiredstringAccent color for the active tab. Accepted values: "primary", "neutral". Omit to use the default ("neutral").

Example:

{
"global": {
"tabs": {
"activeColor": "primary"
}
}
}

Controls the appearance of breadcrumb navigation across components.

NameTypeDescription
fontSize RequiredstringFont size for breadcrumb text. Omit to use the default.
activeItem RequiredobjectActive breadcrumb item preferences.
NameTypeDescription
fontWeight Required100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 950 , "normal" , "bold" , "bolder" , "lighter"Font weight for the active breadcrumb item. Omit to use the default.

Example:

{
"global": {
"breadcrumbs": {
"fontSize": "14px",
"activeItem": {
"fontWeight": 600
}
}
}
}

Fields

Controls the appearance of form fields (inputs, selects, text areas, and their labels) across components.

NameTypeDescription
input RequiredobjectInput control preferences.
label RequiredobjectField label preferences.

Input

NameTypeDescription
size RequiredstringInput size preset. Accepted values: "small", "medium". Omit to use the default size.
border RequiredobjectInput border preferences.
Border
NameTypeDescription
width RequiredstringBorder width for inputs. Accepts any valid CSS length value (for example, "1px").
radius RequiredstringBorder radius for inputs. Accepts any valid CSS length value (for example, "6px").

Label

NameTypeDescription
fontWeight RequiredstringFont weight for field labels. Accepted values: "bold", "regular". Omit to use the default ("bold").

Example:

{
"global": {
"fields": {
"input": {
"size": "medium",
"border": {
"width": "1px",
"radius": "6px"
}
},
"label": {
"fontWeight": "regular"
}
}
}
}

Component Specific Settings

Card

NameTypeDescription
designs RequiredArray of DesignThe main title used in the Components. Examples include the Card title, Activity table title etc
override RequiredGlobalThe secondary title used in the Components. Examples include menus and empty states

Card Design

NameTypeDescription
name RequiredstringName of your design, should match the name of Card design in Unit. For charge cards the name must contain "_credit".
url RequiredstringLink to Card image
fontColor RequiredstringWill control the font color on top of the Card
boxShadow RequiredstringWill control the Card shadow

Account

NameTypeDescription
titleColor RequiredstringWill control the font color of the account title
balanceTitleColor RequiredstringWill control the font color of the balance title
coverBackgroundColor RequiredstringWill control the color of the cover background

Application Form

Applies to unit-elements-application-form. To recolor the Application Form sidebar without affecting other Components that render a sidebar, set Sidebar colors under override.global.sidebar:

{
"elementsApplicationForm": {
"selectionStageIconsPrimaryColor": true,
"override": {
"global": {
"sidebar": {
"colors": {
"background": "#0B1020",
"neutral": "#0B1020"
}
}
}
}
}
}
NameTypeDescription
override RequiredGlobalGlobal overrides scoped to the Application Form, including a sidebar palette.
selectionStageIconsPrimaryColor RequiredbooleanWhen true, icons in the Application Form account-type selection stage use the theme's primary color. Default is false.
sidebarBackgroundColor RequiredstringDeprecated. Background color of the Application Form sidebar. Prefer the sidebar palette instead.
Important Info

elementsApplicationForm.sidebarBackgroundColor still works but is discouraged. It recolors only the background — sidebar text, borders and icons are not re-derived, so a dark value can produce unreadable content. It exists for backwards-compatibility only.

Prefer setting global.sidebar.colors, or scope it to the Application Form via elementsApplicationForm.override.global.sidebar.colors. These drive the full palette (primary, secondary, neutral, background, info, success, warning, error) and re-derive contrasting text, border and icon colors.

Precedence

When multiple sidebar settings are provided, the background color is resolved in this order (first match wins):

  1. elementsApplicationForm.override.global.sidebar.colors.background — element-scoped palette.
  2. global.sidebar.colors.background — theme-wide palette.
  3. elementsApplicationForm.sidebarBackgroundColor — legacy, deprecated.

Default Theme

You can set a default theme for all components in the Unit Dashboard under Org Settings → Branding. The dashboard displays all themes created by your organization, and the selected theme will be applied to all components by default unless a specific theme is provided.

Create Theme

Creates theme for white label components.

VerbPOST
URLhttps://api.s.unit.sh/white-label/theme
Data TypewhiteLabelTheme
Timeout (Seconds)5

Attributes

NameTypeDescription
name RequiredstringTheme Name.
global RequiredobjectGlobal theme setup.
elementsCard RequiredobjectCard element setup.
elementsActivity RequiredobjectActivity element setup.
elementsAccount RequiredobjectAccount theme setup.
elementsPayment RequiredobjectPayment theme setup.
elementsApplicationForm RequiredobjectApplication Form element setup.
Example Request:
curl -X POST 'https://api.s.unit.sh/white-label/theme'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "whiteLabelTheme",
"attributes": {
"name": "VIP Theme",
"global": {
"colors": {
"background": "#2223334",
"primary": "#0000F0",
"secondary": "#000000",
"neutral": "#FF9933",
"success": "#0CD96F",
"warning": "#FF9933",
"error": "#FF4F64"
},
"typography": {
"common": {
"fontFamily": "sans-serif"
},
"titles": {
"h2": {
"fontWeight": "800"
},
"h3": {
"fontWeight": "800"
}
}
}
},
"elementsCard": {
"designs": [
{
"name": "default",
"url": "https://d1xlopvhx2cz8k.cloudfront.net/resources/outlay.png",
"fontColor": "#00ff00",
"boxShadow": "0px 3.6px 15px 2px rgb(0 0 0 / 0.25)"
}
]
},
"elementsAccount": {
"override": {
"global": {
"colors": {
"background": "#00ff00"
}
}
}
},
"elementsPayment": {
"override": {
"global": {
"typography": {
"common": {
"fontFamily": "Poppins"
}
}
}
}
}
}
}
}'

Response

Response is a JSON:API document.

201 Created

NameTypeDescription
data RequiredobjectThe requested resource after the operation was completed.
links RequiredobjectRelated Link object with url to be used in component.
NameTypeDescription
type RequiredStringType of the resource in link.
href RequiredobjectURL to be set in theme property of component.
Example Response:
{
"data": {
"type": "whiteLabelTheme",
"id": "10008",
"attributes": {
"...": "..."
},
"links": {
"related": {
"type": "application/json",
"href": "https://ui.s.unit.sh/resources/982/themes/605676c1-b00b-4748-9fa4-258d1a28c3fb.json"
}
}
}
}

Update Theme

Updates theme for white label components.

Note

You need to send the full theme object in the request body, not only the fields that were changed.

VerbPUT
URLhttps://api.s.unit.sh/white-label/theme/{id}
Data TypewhiteLabelTheme
Timeout (Seconds)5
Example Request:
curl --request PUT 'https://api.s.unit.sh/white-label/theme/{id}' \
--header 'Content-Type: application/vnd.api+json' \
--data-raw '{
"data": {
"type": "whiteLabelTheme",
"attributes": {
"name": "VIP Theme",
"global": {
"colors": {
"background": "#2223334",
"primary": "#0000F0",
"secondary": "#000000",
"neutral": "#FF9933",
"success": "#0CD96F",
"warning": "#FF9933",
"error": "#FF4F64"
},
"typography": {
"common": {
"fontFamily": "sans-serif"
},
"titles": {
"h2": {
"fontWeight": "800"
},
"h3": {
"fontWeight": "800"
}
}
}
},
"elementsCard": {
"designs": [
{
"name": "default",
"url": "https://d1xlopvhx2cz8k.cloudfront.net/resources/outlay.png",
"fontColor": "#00ff00",
"boxShadow": "0px 3.6px 15px 2px rgb(0 0 0 / 0.25)"
}
]
},
"elementsAccount": {
"override": {
"global": {
"colors": {
"background": "#00ff00"
}
}
}
},
"elementsPayment": {
"override": {
"global": {
"typography": {
"common": {
"fontFamily": "Poppins"
}
}
}
}
}
}
}
}'

Get Theme

Get white label theme by id.

VerbGET
URLhttps://api.s.unit.sh/white-label/theme/{id}
Data TypewhiteLabelTheme
Timeout (Seconds)5
Example Request:
curl -X GET 'https://api.s.unit.sh/white-label/theme/{id}' \
-H "Authorization: Bearer ${TOKEN}"

List

List themes resources. Paging and sorting can be applied.

VerbGET
URLhttps://api.s.unit.sh/white-label/theme
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
filter[fileName]string(empty)Optional. Find by file name.
sortstringsort=-createdAtOptional. sort=createdAt for ascending order or sort=-createdAt (leading minus sign) for descending order.
curl -X GET 'https://api.s.unit.sh/white-label/theme?page[limit]=20&page[offset]=10' \
-H "Authorization: Bearer ${TOKEN}"