Appearance

Overview

The PayMittoAppearance type allows you to fully customize the SDK's visual theme. It uses a JSON structure with two main sections:

  • foundations: Core design tokens (colors, font family)
  • components: Component-specific configurations (buttons, inputs, loading, content)

All properties are optional — the SDK uses sensible defaults for any missing values.


Definition

export type PayMittoAppearance = {
  foundations?: PayMittoFoundations;
  components?: PayMittoComponents;
};

Foundations

Core design tokens used throughout the SDK.

export type PayMittoFoundations = {
  colorPrimary?: PayMittoColorValue;
  colorTextPrimary?: PayMittoColorValue;
  colorTextSecondary?: PayMittoColorValue;
  colorTextLink?: PayMittoColorValue;
  colorForeground?: PayMittoColorValue;
  colorBackground?: PayMittoColorValue;
  colorDivider?: PayMittoColorValue;
  colorSuccess?: PayMittoColorValue;
  colorWarning?: PayMittoColorValue;
  colorDanger?: PayMittoColorValue;
  fontFamily?: PayMittoFontFamily;
};

export type PayMittoColorValue = {
  light: string;  // Hex color for light mode (e.g., '#FFFFFF')
  dark: string;   // Hex color for dark mode (e.g., '#000000')
};

export type PayMittoFontFamily = 'inter' | 'roboto' | 'source sans 3' | 'sf pro';

Foundation Properties

PropertyDescription
colorPrimaryPrimary brand accent color
colorTextPrimaryMain text color
colorTextSecondarySecondary/muted text color
colorTextLinkLink and interactive text color
colorForegroundSurface/card background color
colorBackgroundPage background color
colorDividerSeparator/divider line color
colorSuccessSuccess state color
colorWarningWarning state color
colorDangerError/danger state color
fontFamilyFont family used throughout the SDK

Default Foundation Colors

TokenLight ModeDark Mode
colorPrimary #4451F6 #7B86FF
colorTextPrimary #120F0D #F5F3F0
colorTextSecondary #63615E #9A968F
colorTextLink #F45858 #F87474
colorForeground #FEFDFC #1C1B1A
colorBackground #F8F6F3 #121110
colorDivider #E7E5E2 #2A2927
colorSuccess #008761 #3DBA92
colorWarning #F5B900 #FFCB33
colorDanger #AA220F #E5614F

Default Font

PropertyDefault Value
fontFamilysf pro

Components

Component-specific configurations for buttons, inputs, loading screens, navigation, and content.

export type PayMittoComponents = {
  button?: PayMittoButtonConfig;
  inputFields?: PayMittoInputFieldsConfig;
  loading?: PayMittoLoadingConfig;
  backLink?: PayMittoBackLinkConfig;
  content?: PayMittoContentConfig;
};

Button Configuration

export type PayMittoButtonConfig = {
  buttonPrimaryBackgroundColor?: PayMittoColorValue;
  buttonPrimaryTextColor?: PayMittoColorValue;
  buttonSecondaryBorderColor?: PayMittoColorValue;
  buttonSecondaryTextColor?: PayMittoColorValue;
  buttonTextCase?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
  buttonPrimaryTextShadow?: boolean;
  buttonRadius?: number;
};
PropertyTypeDescription
buttonPrimaryBackgroundColorColorValuePrimary button background
buttonPrimaryTextColorColorValuePrimary button text
buttonSecondaryBorderColorColorValueSecondary button border
buttonSecondaryTextColorColorValueSecondary button text
buttonTextCasestringText transformation for button labels
buttonPrimaryTextShadowbooleanEnable text shadow on primary buttons
buttonRadiusnumberCorner radius in dp/pt

Default Button Values

PropertyLight ModeDark Mode
buttonPrimaryBackgroundColor #1F1093 #5C68FF
buttonPrimaryTextColor #FEFDFC #FEFDFC
buttonSecondaryBorderColor #F45858 #F87474
buttonSecondaryTextColor #F45858 #F87474
PropertyDefault Value
buttonTextCasecapitalize
buttonPrimaryTextShadowfalse
buttonRadius8

Input Fields Configuration

export type PayMittoInputFieldsConfig = {
  inputBorderColor?: PayMittoColorValue;
  inputBackgroundColor?: PayMittoColorValue;
  inputRadius?: number;
};
PropertyTypeDescription
inputBorderColorColorValueInput field border color
inputBackgroundColorColorValueInput field background color
inputRadiusnumberCorner radius in dp/pt

Default Input Values

PropertyLight ModeDark Mode
inputBorderColor #BFBDBA #3A3937
inputBackgroundColor #FEFDFC #1C1B1A
PropertyDefault Value
inputRadius8

Loading Configuration

export type PayMittoLoadingConfig = {
  loadingBackgroundColor?: PayMittoColorValue;
  loadingTextColor?: PayMittoColorValue;
  loadingSpinnerColor?: PayMittoColorValue;
};
PropertyTypeDescription
loadingBackgroundColorColorValueLoading screen background
loadingTextColorColorValueLoading screen text
loadingSpinnerColorColorValueLoading spinner color

Default Loading Values

PropertyLight ModeDark Mode
loadingBackgroundColor #1F1093 #5C68FF
loadingTextColor #FFFFFF #FEFDFC
loadingSpinnerColor #4451F6 #7B86FF

Back Link Configuration

export type PayMittoBackLinkConfig = {
  backIconType?: 'arrow' | 'chevron';
  backTextCase?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
};
PropertyTypeDescription
backIconTypestringBack button icon style
backTextCasestringText transformation for back button label

Default Back Link Values

PropertyDefault Value
backIconTypechevron
backTextCasecapitalize

Content Configuration

Customize the home screen headline and description.

export type PayMittoContentConfig = {
  contentHomepageHeadline?: PayMittoHomepageHeadline;
  contentHomepageDescription?: PayMittoHomepageDescription;
};

export type PayMittoHomepageHeadline =
  | 'Global transfer'
  | 'International & domestic transfers'
  | 'International transfers'
  | 'Send money internationally';

export type PayMittoHomepageDescription =
  | 'Send funds to your recipients with convenience and flexibility.'
  | 'Send money to friends and family in other countries';

Available Headlines

ValueEnglishSpanish
Global transferGlobal transferTransferencia global
International & domestic transfersInternational & domestic transfersTransferencias internacionales y domésticas
International transfersInternational transfersTransferencias internacionales
Send money internationallySend money internationallyEnviar dinero al extranjero

Available Descriptions

ValueEnglishSpanish
Send funds to your recipients with convenience and flexibility.Send funds to your recipients with convenience and flexibility.Envíe fondos a sus destinatarios de forma práctica y flexible.
Send money to friends and family in other countriesSend money to friends and family in other countriesEnviar dinero a amigos y familiares en otros países

Complete Example

import {
  startSDK,
  PayMittoEnvironment,
  PayMittoSupportedAppearance,
  type PayMittoAppearance,
} from 'react-native-paymitto-sdk';

const appearance: PayMittoAppearance = {
  foundations: {
    colorPrimary: { light: '#4451F6', dark: '#7B86FF' },
    colorTextPrimary: { light: '#120F0D', dark: '#F5F3F0' },
    colorTextSecondary: { light: '#63615E', dark: '#9A968F' },
    colorTextLink: { light: '#F45858', dark: '#F87474' },
    colorForeground: { light: '#FEFDFC', dark: '#1C1B1A' },
    colorBackground: { light: '#F8F6F3', dark: '#121110' },
    colorDivider: { light: '#E7E5E2', dark: '#2A2927' },
    colorSuccess: { light: '#008761', dark: '#3DBA92' },
    colorWarning: { light: '#F5B900', dark: '#FFCB33' },
    colorDanger: { light: '#AA220F', dark: '#E5614F' },
    fontFamily: 'sf pro',
  },
  components: {
    button: {
      buttonPrimaryBackgroundColor: { light: '#1F1093', dark: '#5C68FF' },
      buttonPrimaryTextColor: { light: '#FEFDFC', dark: '#FEFDFC' },
      buttonSecondaryBorderColor: { light: '#F45858', dark: '#F87474' },
      buttonSecondaryTextColor: { light: '#F45858', dark: '#F87474' },
      buttonTextCase: 'capitalize',
      buttonPrimaryTextShadow: false,
      buttonRadius: 8,
    },
    inputFields: {
      inputBorderColor: { light: '#BFBDBA', dark: '#3A3937' },
      inputBackgroundColor: { light: '#FEFDFC', dark: '#1C1B1A' },
      inputRadius: 8,
    },
    loading: {
      loadingBackgroundColor: { light: '#1F1093', dark: '#5C68FF' },
      loadingTextColor: { light: '#FFFFFF', dark: '#FEFDFC' },
      loadingSpinnerColor: { light: '#4451F6', dark: '#7B86FF' },
    },
    backLink: {
      backIconType: 'chevron',
      backTextCase: 'capitalize',
    },
    content: {
      contentHomepageHeadline: 'Global transfer',
      contentHomepageDescription: 'Send funds to your recipients with convenience and flexibility.',
    },
  },
};

startSDK({
  configuration: {
    environment: PayMittoEnvironment.Sandbox,
    appearance: appearance,
    supportedAppearance: PayMittoSupportedAppearance.Device,
  },
  fetchAccessTokenDetails: async () => ({ /* ... */ }),
  verifyFundsAndCreateTransfer: async (request) => ({ transferId: 'TXN123' }),
});

Partial Customization

You don't need to provide all values. Only override what you need:

const appearance: PayMittoAppearance = {
  foundations: {
    colorPrimary: { light: '#FF5722', dark: '#FF7043' },
    fontFamily: 'roboto',
  },
  components: {
    button: {
      buttonRadius: 24,
    },
  },
};