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:

KeyPurposeApplies to
themeSelect a built-in theme as a baselineAll elements
variablesGlobal design tokens (colours, fonts, spacing) exposed as CSS custom propertiesAll elements
stylesPer-component CSS overrides keyed by selector nameAll elements
settingsComponent-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:

ThemeDescription
"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#

VariableTypeDescription
borderRadiusstring | numberGlobal corner radius applied to inputs, buttons, and cards.
boxShadowstringDefault box shadow.
colorBackgroundPrimarystringPrimary surface/background colour.
colorBackgroundSecondarystringSecondary surface colour used for cards and grouped areas.
colorErrorstringColour applied to error states and validation messages.
colorFocusedstringColour applied to focused input borders and focus rings.
colorLabelstringDefault colour for input labels.
colorOutlinestringOutline/border colour for inputs.
colorPlaceholderstringColour for input placeholder text.
colorPrimarystringPrimary brand accent colour used for buttons and interactive elements.
colorSelectedstringColour applied to selected/active elements.
colorTextstringDefault text colour.
fontFamilystringFont stack for all text.
fontSizeBasestringBase font size.
paddingHorizontalInputstring | numberHorizontal padding inside input fields.
spacingUnitstring | numberBase 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.

Button

Selector Key
Button
ButtonPrimary
ButtonPrimaryFocused
ButtonPrimaryHovered
ButtonProgressSpinner

Input

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#

PropertyTypeRequiredDescription
cardExpiryInputType"dropdown" | "text"optionalControls 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"optionalControls 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#

PropertyTypeRequiredDescription
googlePayButtonConfigobjectoptionalOptions 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
PropertyTypeRequiredDescription
buttonColorstringoptionalWhich 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.
buttonRadiusnumberoptionalCorner radius in pixels. Google’s brand guidelines allow the roundness to be tuned to match your other buttons, but not the button’s proportions.
buttonTypestringoptionalThe 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’.
googlePayFlowstringoptionalHow 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.
googlePayStylestringoptionalHow 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.
hideDetailedInfobooleanoptionalHides the info icon and popup content giving additional details about the payment method.
hideHeaderbooleanoptionalHides the payment method header text/logo.
hideLogosbooleanoptionalHides logos displayed adjacent to the payment method header i.e. supported banks or card types.
hideSummarybooleanoptionalHides the payment method summary text thats below the header.
orderobjectoptionalControls the display order of payment methods. Each key is a payment method name with a numeric value — lower numbers appear first.
▶ 8 properties
PropertyTypeRequiredDescription
ApplePaynumberoptionalDisplay order for Apple Pay. Lower numbers appear first.
CardnumberoptionalDisplay order for Card payments. Lower numbers appear first.
GooglePaynumberoptionalDisplay order for Google Pay. Lower numbers appear first.
MasterPassnumberoptionalDisplay order for MasterPass. Lower numbers appear first.
MobicrednumberoptionalDisplay order for Mobicred. Lower numbers appear first.
OttVouchernumberoptionalDisplay order for OTT Voucher. Lower numbers appear first.
OzownumberoptionalDisplay order for Ozow EFT. Lower numbers appear first.
ZappernumberoptionalDisplay 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#

PropertyTypeRequiredDescription
googlePayButtonConfigobjectoptionalOptions 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
PropertyTypeRequiredDescription
buttonColorstringoptionalWhich 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.
buttonRadiusnumberoptionalCorner radius in pixels. Google’s brand guidelines allow the roundness to be tuned to match your other buttons, but not the button’s proportions.
buttonTypestringoptionalThe 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’.
googlePayFlowstringoptionalHow 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.
googlePayStylestringoptionalHow 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.
hideDetailedInfobooleanoptionalHides the info icon and popup content giving additional details about the payment method.
hideHeaderbooleanoptionalHides the payment method header text/logo.
hideLogosbooleanoptionalHides logos displayed adjacent to the payment method header i.e. supported banks or card types.
hideSummarybooleanoptionalHides 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 .