Appearance
Appearance Customization#
Every SDK element accepts an optional appearance property that controls the look and feel of the rendered UI. You can apply a built-in theme, override individual design tokens, restyle specific components, or adjust behavioural settings — all without touching any internal markup.
For full type definitions of each element’s appearance object, see the
SDK API Reference
.
Structure#
The appearance object has four top-level keys:
| Key | Purpose | Applies to |
|---|
theme | Select a built-in theme as a baseline | All elements |
variables | Global design tokens (colours, fonts, spacing) exposed as CSS custom properties | All elements |
styles | Per-component CSS overrides keyed by selector name | All elements |
settings | Component-level behavioural configuration (non-CSS) | Element-specific |
adumoClient.initPayments({
ref: document.getElementById("payments-element-container"),
sessionToken: "...",
appearance: {
theme: "light",
variables: { colorPrimary: "#1834cc" },
styles: {
ButtonPrimary: { backgroundColor: "#1834cc" },
},
settings: {
inputLabelType: "float-in",
},
},
});
When a theme is specified alongside variables, styles, or settings, the explicit values override the corresponding theme defaults.
Themes#
A theme provides sensible defaults for every variable, style, and setting. The SDK includes the following themes:
| Theme | Description |
|---|
"light" | Light background with Montserrat typography and purple/blue accent colours. |
"dark" | Dark background with Montserrat typography and lightened purple/blue accent colours, for dark checkout surfaces. |
Apply a theme by setting the theme key:
appearance: {
theme: "light",
}
You can then override any individual variable, style selector, or setting on top of the theme.
Variables#
Variables are global design tokens injected as CSS custom properties on the element container. They cascade to all child components, making them the most effective way to apply broad visual changes.
Available Variables#
| Variable | Type | Description |
|---|
borderRadius | string | number | Global corner radius applied to inputs, buttons, and cards. |
boxShadow | string | Default box shadow. |
colorBackgroundPrimary | string | Primary surface/background colour. |
colorBackgroundSecondary | string | Secondary surface colour used for cards and grouped areas. |
colorError | string | Colour applied to error states and validation messages. |
colorFocused | string | Colour applied to focused input borders and focus rings. |
colorLabel | string | Default colour for input labels. |
colorOutline | string | Outline/border colour for inputs. |
colorPlaceholder | string | Colour for input placeholder text. |
colorPrimary | string | Primary brand accent colour used for buttons and interactive elements. |
colorSelected | string | Colour applied to selected/active elements. |
colorText | string | Default text colour. |
fontFamily | string | Font stack for all text. |
fontSizeBase | string | Base font size. |
paddingHorizontalInput | string | number | Horizontal padding inside input fields. |
spacingUnit | string | number | Base spacing unit used for consistent margins and gaps between elements. |
Example#
appearance: {
theme: "light",
variables: {
colorPrimary: "#0066ff",
fontFamily: "'Inter', sans-serif",
borderRadius: 12,
},
}
Numeric values for dimensional properties like borderRadius are automatically converted to pixel strings (e.g. 12 becomes "12px").
Styles#
Styles let you target individual UI components with standard CSS properties. Each component is identified by a selector key — a descriptive name that maps to an internal CSS class.
How It Works#
Provide an object keyed by selector name, where each value is an object of CSS properties:
appearance: {
styles: {
ButtonPrimary: {
backgroundColor: "#0066ff",
borderRadius: "8px",
fontSize: "14px",
},
Input: {
color: "#333333",
},
},
}
CSS property names use camelCase (e.g. backgroundColor, borderRadius). Numeric values for dimensional properties are automatically converted to pixel strings.
Selector Reference#
Below is the full list of available selector keys, grouped by element and component.
AdumoClient#
Selectors that may appear in multiple Elements.
| Selector Key |
|---|
Button |
ButtonPrimary |
ButtonPrimaryFocused |
ButtonPrimaryHovered |
ButtonProgressSpinner |
| Selector Key |
|---|
Input |
InputClearIcon |
InputClearIconHovered |
InputContainer |
InputContainerError |
InputContainerErrorFocusedWithin |
InputContainerErrorHovered |
InputContainerFocusedWithin |
InputContainerHovered |
InputErrorText |
InputField |
InputPlaceholder |
Label
| Selector Key |
|---|
Label |
LabelError |
LabelFloating |
LabelHovered |
Dropdown
| Selector Key |
|---|
DropdownContainer |
DropdownEditableInputField |
DropdownErrorText |
DropdownInput |
DropdownInputContainer |
DropdownInputContainerError |
DropdownInputField |
DropdownInputIcon |
DropdownItem |
DropdownItemFocused |
DropdownItemHovered |
DropdownItemSelected |
DropdownItemSelectedFocused |
DropdownItemSelectedHovered |
DropdownLabel |
DropdownMenu |
Dialog
| Selector Key |
|---|
Dialog |
DialogBackdrop |
DialogBody |
DialogCloseButton |
DialogCloseButtonIcon |
DialogCloseButtonIconHovered |
DialogHeader |
DialogHeaderTitle |
Toggle
| Selector Key |
|---|
Toggle |
ToggleLabel |
ToggleSwitch |
ToggleSwitchChecked |
ToggleSwitchFocused |
SVG / Icons
| Selector Key |
|---|
ProgressSpinner |
Other
| Selector Key |
|---|
Link |
LinkHovered |
PaymentsElement#
Includes the following AdumoClient selectors: Button, Input, Label, Dropdown, Dialog, Toggle, SVG / Icons.
Transaction Amount Input
| Selector Key |
|---|
TransactionAmountInput |
TransactionAmountInputContainer |
TransactionAmountInputField |
TransactionAmountItem |
TransactionAmountItemSelected |
TransactionAmountMenu |
Card Number Input
| Selector Key |
|---|
CardNumberInput |
CardNumberInputField |
CardNumberInputMenu |
CardNumberItem |
CardNumberItemContainer |
CardNumberItemDeleteConfirmText |
CardNumberItemDeleteConfirmTextFocused |
CardNumberItemDeleteIcon |
CardNumberItemDeleteIconFocused |
CardNumberItemDeleteIconHovered |
CardNumberItemDetails |
CardNumberItemDetailsFocused |
CardNumberItemExpiry |
CardNumberItemExpiryFocused |
CardNumberItemExpiryHovered |
CardNumberItemFocused |
CardNumberItemLogo |
CardNumberItemNumber |
CardNumberItemNumberFocused |
CardNumberItemSpinner |
CardNumberItemSpinnerFocused |
Card Payment Form
| Selector Key |
|---|
CardFieldsButtonPrimary |
CardFieldsDropdownInput |
CardFieldsForm |
CardFieldsHeading |
CardFieldsInfoBlock |
CardFieldsInfoIcon |
CardFieldsInput |
CardFieldsInputContainer |
CardFieldsInputContainerError |
CardFieldsInputErrorText |
CardFieldsInputField |
CardFieldsPayNowButton |
CardFieldsSaveCardToggle |
CardFieldsSavedCardsIcon |
Other
| Selector Key |
|---|
CardExpiryInput |
CardExpiryInputField |
MobicredLoginButtonPrimary |
MobicredLoginForm |
MobicredLoginHeading |
MobicredLoginInput |
MobicredLoginInputContainer |
MobicredLoginInputContainerError |
MobicredLoginInputErrorText |
MobicredLoginRegistrationLink |
MobicredLoginRegistrationText |
MobicredOtpButtonPrimary |
MobicredOtpCountdownText |
MobicredOtpCountdownTime |
MobicredOtpForm |
MobicredOtpHeading |
MobicredOtpInput |
MobicredOtpInputContainer |
MobicredOtpInputContainerError |
MobicredOtpInputErrorText |
MobicredOtpResendLink |
MobicredOtpResendText |
OttVoucherButtonPrimary |
OttVoucherForm |
OttVoucherFormLogo |
OttVoucherInput |
OttVoucherInputContainer |
OttVoucherInputContainerError |
OttVoucherInputErrorText |
OttVoucherInstruction |
OttVoucherPayNowButton |
OttVoucherSubmitError |
ZapperPaymentContainer |
PaymentMethodElement#
Payment Method
| Selector Key |
|---|
PaymentMethod |
PaymentMethodApplePayHeaderIcon |
PaymentMethodBody |
PaymentMethodCardLogoIcon |
PaymentMethodGooglePayHeaderIcon |
PaymentMethodHeader |
PaymentMethodHovered |
PaymentMethodInfoIcon |
PaymentMethodMasterPassHeaderIcon |
PaymentMethodMobicredHeaderIcon |
PaymentMethodOttVoucherHeaderIcon |
PaymentMethodOzowBankLogoIcon |
PaymentMethodOzowHeaderIcon |
PaymentMethodSummary |
PaymentMethodZapperHeaderIcon |
PaymentMethodsElement#
Payment Method
| Selector Key |
|---|
PaymentMethod |
PaymentMethodApplePayHeaderIcon |
PaymentMethodBody |
PaymentMethodCardLogoIcon |
PaymentMethodContainer |
PaymentMethodGooglePayHeaderIcon |
PaymentMethodHeader |
PaymentMethodHovered |
PaymentMethodInfoIcon |
PaymentMethodMasterPassHeaderIcon |
PaymentMethodMobicredHeaderIcon |
PaymentMethodOttVoucherHeaderIcon |
PaymentMethodOzowBankLogoIcon |
PaymentMethodOzowHeaderIcon |
PaymentMethodSummary |
PaymentMethodZapperHeaderIcon |
BillingDetailsElement#
Billing Details
| Selector Key |
|---|
BillingDetailsForm |
Settings#
Settings control component-level behaviour that is not expressible through CSS. Each element type has its own set of available settings.
PaymentsElement Settings#
| Property | Type | Required | Description |
|---|
cardExpiryInputType | "dropdown" | "text" | optional | Controls how the card expiry is captured. Options: dropdown (separate month and year pickers), text (a single typed MM / YY field). |
inputLabelType | "float-in" | "float-on" | "float-over" | "ifta" | optional | Controls how input labels animate relative to the input field. Options: float-in (shrinks inside on focus), float-on (sits on border, moves up), float-over (floats above on focus), ifta (in-field top-aligned). |
adumoClient.initPayments({
ref: document.getElementById("payments-element-container"),
sessionToken: "...",
appearance: {
theme: "light",
settings: {
inputLabelType: "float-over",
},
},
});
PaymentMethodsElement Settings#
| Property | Type | Required | Description |
|---|
googlePayButtonConfig | object | optional | Options passed to Google’s own button, applied only when googlePayStyle is ‘google’. Google renders and owns this button, so these are the only customisations available — its logo and card art placement are theirs and cannot be changed, and it always fills the payment method it sits in. See https://developers.google.com/pay/api/web/guides/brand-guidelines#custom-button |
▶ 3 properties| Property | Type | Required | Description |
|---|
buttonColor | string | optional | Which of Google’s two button styles to render. ‘black’ is the dark button, ‘white’ the light one, and ‘default’ lets Google choose (currently the dark button). Google’s brand guidelines ask for whichever contrasts with the surface behind it — dark on light backgrounds, light on dark or colourful ones. Left unset, the button follows the background it is painted on. | buttonRadius | number | optional | Corner radius in pixels. Google’s brand guidelines allow the roundness to be tuned to match your other buttons, but not the button’s proportions. | buttonType | string | optional | The button’s caption. ‘plain’ is the Google Pay mark on its own with no wording; every other value pairs the mark with that call to action. Google translates the caption to the shopper’s browser language. Defaults to ‘plain’. |
|
googlePayFlow | string | optional | How Google Pay opens its payment sheet. ‘handoff’ (the default) opens a gateway-hosted window that makes the call from an already-registered origin, so it works for any merchant domain at the cost of a popup and an extra click. ‘in-page’ calls Google directly from the merchant’s page — one click and no popup, but it requires that domain to be registered against the gateway’s Google Pay merchant ID, and otherwise fails with OR_BIBED_11. |
googlePayStyle | string | optional | How Google Pay is presented in the payment method list. ’tile’ renders a themed tile matching the other payment methods, styled by your appearance configuration. ‘google’ renders Google’s own payment button, which takes no styling beyond Google’s supported options but is what Google’s brand guidelines require. |
hideDetailedInfo | boolean | optional | Hides the info icon and popup content giving additional details about the payment method. |
hideHeader | boolean | optional | Hides the payment method header text/logo. |
hideLogos | boolean | optional | Hides logos displayed adjacent to the payment method header i.e. supported banks or card types. |
hideSummary | boolean | optional | Hides the payment method summary text thats below the header. |
order | object | optional | Controls the display order of payment methods. Each key is a payment method name with a numeric value — lower numbers appear first. |
▶ 8 properties| Property | Type | Required | Description |
|---|
ApplePay | number | optional | Display order for Apple Pay. Lower numbers appear first. | Card | number | optional | Display order for Card payments. Lower numbers appear first. | GooglePay | number | optional | Display order for Google Pay. Lower numbers appear first. | MasterPass | number | optional | Display order for MasterPass. Lower numbers appear first. | Mobicred | number | optional | Display order for Mobicred. Lower numbers appear first. | OttVoucher | number | optional | Display order for OTT Voucher. Lower numbers appear first. | Ozow | number | optional | Display order for Ozow EFT. Lower numbers appear first. | Zapper | number | optional | Display order for Zapper. Lower numbers appear first. |
|
adumoClient.initPaymentMethods({
ref: document.getElementById("payment-methods-container"),
appearance: {
settings: {
order: {
ApplePay: 0,
GooglePay: 1,
Card: 2,
Ozow: 3,
},
},
},
});
PaymentMethodElement Settings#
| Property | Type | Required | Description |
|---|
googlePayButtonConfig | object | optional | Options passed to Google’s own button, applied only when googlePayStyle is ‘google’. Google renders and owns this button, so these are the only customisations available — its logo and card art placement are theirs and cannot be changed, and it always fills the payment method it sits in. See https://developers.google.com/pay/api/web/guides/brand-guidelines#custom-button |
▶ 3 properties| Property | Type | Required | Description |
|---|
buttonColor | string | optional | Which of Google’s two button styles to render. ‘black’ is the dark button, ‘white’ the light one, and ‘default’ lets Google choose (currently the dark button). Google’s brand guidelines ask for whichever contrasts with the surface behind it — dark on light backgrounds, light on dark or colourful ones. Left unset, the button follows the background it is painted on. | buttonRadius | number | optional | Corner radius in pixels. Google’s brand guidelines allow the roundness to be tuned to match your other buttons, but not the button’s proportions. | buttonType | string | optional | The button’s caption. ‘plain’ is the Google Pay mark on its own with no wording; every other value pairs the mark with that call to action. Google translates the caption to the shopper’s browser language. Defaults to ‘plain’. |
|
googlePayFlow | string | optional | How Google Pay opens its payment sheet. ‘handoff’ (the default) opens a gateway-hosted window that makes the call from an already-registered origin, so it works for any merchant domain at the cost of a popup and an extra click. ‘in-page’ calls Google directly from the merchant’s page — one click and no popup, but it requires that domain to be registered against the gateway’s Google Pay merchant ID, and otherwise fails with OR_BIBED_11. |
googlePayStyle | string | optional | How Google Pay is presented in the payment method list. ’tile’ renders a themed tile matching the other payment methods, styled by your appearance configuration. ‘google’ renders Google’s own payment button, which takes no styling beyond Google’s supported options but is what Google’s brand guidelines require. |
hideDetailedInfo | boolean | optional | Hides the info icon and popup content giving additional details about the payment method. |
hideHeader | boolean | optional | Hides the payment method header text/logo. |
hideLogos | boolean | optional | Hides logos displayed adjacent to the payment method header i.e. supported banks or card types. |
hideSummary | boolean | optional | Hides the payment method summary text thats below the header. |
adumoClient.initPaymentMethod({
ref: document.getElementById("payment-method-container"),
type: "Card",
appearance: {
settings: {
hideDetailedInfo: true,
hideSummary: true,
},
},
});
BillingDetailsElement Settings#
No settings available for this element.
Full Example#
The following example applies the light theme with custom brand colours, adjusted input labels, and payment method ordering:
adumoClient.initPayments({
ref: document.getElementById("payments-element-container"),
sessionToken: "...",
appearance: {
theme: "light",
variables: {
colorPrimary: "#0066ff",
colorFocused: "#0044cc",
fontFamily: "'Inter', sans-serif",
borderRadius: 8,
},
styles: {
ButtonPrimary: {
backgroundColor: "#0066ff",
color: "#ffffff",
},
InputContainerFocusedWithin: {
borderColor: "#0066ff",
},
},
settings: {
inputLabelType: "float-over",
},
},
});
adumoClient.initPaymentMethods({
ref: document.getElementById("payment-methods-container"),
appearance: {
theme: "light",
variables: {
colorPrimary: "#0066ff",
},
styles: {
PaymentMethodContainer: {
backgroundColor: "#f8f9fa",
borderRadius: "12px",
},
},
settings: {
order: { Card: 0, ApplePay: 1, GooglePay: 2, Ozow: 3 },
},
},
});
Interactive Playground#
Try out all of the above options in real time using the Storybook Playground
.