PaySwitcher
  • About PaySwitcher
    • πŸ›’For Online Businesses
    • πŸͺœFor Small & Medium Enterprises
    • 🏒For Enterprises
    • πŸ–₯️For SaaS Providers
    • πŸ›οΈFor E-Commerce Businesses
    • πŸ“¦For Marketplace/Platforms
    • 🏦For Banks & Financial Institutions
  • PaySwitcher Cloud
    • ⚑Quickstart
      • πŸ“₯Migrate from Stripe
        • Web
        • Android
        • iOS
        • React Native
      • πŸ₯—Payment Recipes
        • Use PayPal With Stripe
    • βš™οΈControl Centre Account setup
    • πŸ“¦Integration guide
      • 🌐Web
        • Node And React
        • Customization
        • Error Codes
        • Node and HTML
        • Vanilla JS and REST API Integration
      • πŸ“±Android
        • Kotlin with Node Backend
        • Customization
        • Features
      • πŸ“±iOS
        • Swift with Node Backend
        • Customization
        • Features
      • ⏺️React Native
        • React Native with Node Backend (Beta)
        • Card Widget (Beta)
        • Customization
      • ⏺️Flutter
        • Flutter with Node Backend
        • Customization
      • Headless SDK
      • Payment Methods Management
    • πŸ’³Payment methods setup
      • πŸ’³Cards
      • πŸ“±Wallets
        • Apple Pay
          • Web Domain
          • iOS Application
        • Google Pay
        • PayPal
      • πŸ“†Pay Later
      • 🏦Banks
        • Bank Debits
        • Bank Redirects
        • Bank Transfers
      • πŸͺ™Crypto
      • πŸ”‘Test Credentials
    • πŸ”ŒConnectors
      • πŸ–²οΈAvailable Connectors
        • ACI
        • Adyen
        • Airwallex
        • Authorizedotnet
        • Bambora
        • Bank of America
        • Billwerk
        • Bluesnap
        • Braintree
        • Checkout
        • Coinbase
        • Cybersource
          • Apple Pay
          • Google Pay
        • dLocal
        • Fiserv
        • GlobalPayments
        • GoCardless
        • Klarna
        • Mollie
        • MultiSafepay
        • Nuvei
        • OpenNode
        • Paypal
        • PayU
        • Prophetpay
        • Rapyd
        • Shift4
        • Stripe
        • TrustPay
        • Volt
        • Worldline
        • Worldpay
        • Zen
      • Activate connector on PaySwitcher
      • Test a Payment with connector
    • πŸͺWebhooks
  • Features
    • πŸ”€Payment flows
      • πŸ”Saving payment methods & recurring payments
      • πŸ’΅Payouts
        • βž•Get started with payouts!
        • πŸ”—Process payouts using saved payment methods
        • πŸ›£οΈRoute your payout transactions using Smart Router
        • ♻️Smart Retries in Payout
        • πŸ”—Payout links
      • 0️ 0️ 0️ Zero Amount Authorization
      • πŸ”“Tokenization & saved cards
      • πŸ”—Payment links
      • ⏭️External Authentication for 3DS
      • πŸ’°Manual Capture
      • πŸ›‘Fraud Blocklist
      • πŸ”Subscriptions
      • πŸ”ƒPG Agnostic Recurring Payments
    • πŸ•ΉοΈMerchant controls
      • πŸ›£οΈSmart Router
        • Rule Based Routing
        • Volume Based Routing
        • Default Fallback Routing
      • πŸ›‘οΈFraud & risk management
      • πŸ”ƒSmart retries
      • πŸŽ›οΈAnalytics & operations
      • πŸ“‹3DS decision manager
        • Setup guide
      • πŸ“‹Surcharge
        • Surcharge Setup guide
      • πŸ”Ό3DS Step-up retries
      • 🚩Disputes/Chargebacks Management
      • 🀝Reconciliation
        • Getting Started with Recon
    • πŸ”‘Account management
      • πŸ”’Exporting payments data
      • 🀹Multiple accounts & profiles
      • πŸ›‚Manage your team
    • πŸ›οΈE-commerce platform plugins
      • WooCommerce Plugin
        • Setup
        • Compatibility
        • FAQs
  • SECURITY AND COMPLIANCE
    • πŸ”Overview
    • πŸ’³PCI Compliance
    • πŸ”Data Security
    • πŸ’½GDPR compliance
    • πŸ•΅οΈIdentity and Access Management
  • Learn more
    • 🍑SDK Reference
      • Node
      • React
      • JS
    • πŸ“PaySwitcher Architecture
      • Router
      • Storage
      • A Payments Switch with virtually zero overhead
    • 🌊Payment flows
Powered by GitBook
On this page
  • Colors
  • Shapes
  • Specific UI components
  1. PaySwitcher Cloud
  2. Integration guide
  3. React Native

Customization

Visual customization: Colors, shapes, specific UI components

You can customize the React Native Unified Checkout to supports visual customization, which allows you to match the design of your app

You can modify colors, fonts, and more by using the appearance parameter when you call initPaymentSheet().

Colors

Customize the colors in the mobile Payment Element by modifying the color categories. Each color category determines the color of one or more components in the UI. For example, primary defines the color of the Pay button

Color Category
Usage

primary

Primary defines the color of the Pay button and selected items

background

The color used for the background of your Payment page

componentBackground

The color used for the background of inputs, tabs, and other components

componentBorder

The color used for the external border of inputs, tabs, and other components in your PaymentSheet

componentDivider

The color used for the internal border (meaning the border is shared with another component) of inputs, tabs, and other components in your PaymentSheet

primaryText

The color of the header text in your Payment page

secondaryText

The color of the label text of input fields

componentText

The color of the input text in your PaymentSheet components, such as the user's card number or zip code

placeholderText

The color of the placeholder text of input fields

icon

The color used for icons in your Payment Sheet, such as the close (x) button

error

The color used to indicate errors or destructive actions in your Payment Sheet

appearance: {
   colors: {
   primary: '#F8F8F2',
   background: '#ffffff',
   componentBackground: '#E6DB74',
   componentBorder: '#FD971F',
   componentDivider: '#FD971F',
   primaryText: '#F8F8F2',
   secondaryText: '#75715E',
   componentText: '#AE81FF',
   placeholderText: '#E69F66',
   icon: '#F92672',
   error: '#FF0000',
 }
}

Note To support dark mode, pass maps for both light and dark colors to colors.

colors: {
   light:{
      primary: '#F8F8F2',
      background: '#00FF00',
      componentBackground: '#E6DB74',
      componentBorder: '#FD971F',
      componentDivider: '#FD971F',
      primaryText: '#F8F8F2',
      secondaryText: '#75715E',
      componentText: '#AE81FF',
      placeholderText: '#E69F66',
      icon: '#F92672',
      error: '#F92672',
   },
   dark: {
      primary: '#00ff0099',
      background: '#ff0000',
      componentBackground: '#ff0080',
      componentBorder: '#62ff08',
      componentDivider: '#d6de00',
      primaryText: '#5181fc',
      secondaryText: '#ff7b00',
      componentText: '#00ffff',
      placeholderText: '#00ffff',
      icon: '#f0f0f0',
      error: '#0f0f0f',
    },
 },

Shapes

you can customize the border radius, border width, and shadow used throughout the mobile Payment Element.

Shape Category
Usage

borderRadius

radius of the border of the input fields, tabs and other components of the payment page

borderWidth

width of the border used to across input fields, tabs and other components

shapes: {
    borderRadius: 10,
    borderWidth: 1,
  },

Specific UI components

The sections above describe customization options that affect the mobile Payment Element broadly, across multiple UI components. We also provide customization options specifically for the primary button (for example, the Pay button).

Customization options for specific UI components take precedence over other values. For example, primaryButton.shapes.borderRadius overrides the value of shapes.borderRadius.

primaryButton: {
    colors: {
      background: '#000000',
      text: '#ffffff',
      border: '#ff00ff',
    },
    shapes: {
      borderRadius: 10,
      borderWidth: 1.5,

    },
  },

Now you can test the payments on your app and go-live!

PreviousCard Widget (Beta)NextFlutter

Last updated 11 months ago

πŸ“¦
⏺️