# Customize Element appearance to match your iOS, Android, or React Native app

Match Mobile Checkout Elements to your iOS, Android, or React Native app.

After you [build a checkout page](https://docs.stripe.com/payments/mobile/checkout-sessions/build-a-checkout-page.md), you can customize colors, fonts, shapes, and other supported properties to match your app. Mobile Checkout Elements retain their layouts and interaction patterns. Assigning a configuration to an Element also opts your integration into that Element, so configure only the Elements you use.

### Want access to Mobile Checkout Elements?

Mobile Checkout Elements is in private preview. Share your email address to request access.

```bash
curl https://docs.stripe.com/preview/register \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Referer: https://docs.stripe.com/payments/mobile/checkout-sessions/customize-appearance" \
  -d '{"email": "EMAIL", "preview": "elements_beta_preview"}'
```
![Two phones showing the Payment Element. The left one, labeled Default, uses the standard light appearance and a blue Pay button. The right one, labeled Customized, uses a dark appearance, purple accents, and a rounded purple Pay button.](https://b.stripecdn.com/docs-statics-srv/assets/customize-appearance-light-dark.65ed6fa158032342e0d060231df586a8.png)

Appearance APIs can change before public preview.

# iOS


Each Element has a `Configuration.Appearance` object. Set values on these objects to change the Element’s appearance.

## Customize Payment Element 

```swift
var appearance = PaymentElement.Configuration.Appearance()

appearance.font.base = UIFont(
    name: "AvenirNext-Regular",
    size: UIFont.systemFontSize
)!
appearance.font.sizeScaleFactor = 1.05
appearance.cornerRadius = 12
appearance.borderWidth = 1
appearance.shadow = .disabled

appearance.colors.primary = UIColor(named: "BrandPrimary")!
appearance.colors.background = .systemBackground
appearance.colors.componentBackground = .secondarySystemBackground
appearance.colors.componentBorder = .separator
appearance.colors.componentText = .label
appearance.colors.componentPlaceholderText = .placeholderText
appearance.colors.text = .label
appearance.colors.textSecondary = .secondaryLabel
appearance.colors.danger = .systemRed

var paymentElement = PaymentElement.Configuration()
paymentElement.appearance = appearance
configuration.paymentElement = paymentElement
```

## Customize the Shipping Address Element 

The Shipping Address Element uses the same appearance configuration property names as Payment Element. The same property name controls equivalent aspects of the UI across both elements.

```swift
var appearance = ShippingAddressElement.Configuration.Appearance()

appearance.font.base = UIFont(
    name: "AvenirNext-Regular",
    size: UIFont.systemFontSize
)!
appearance.font.sizeScaleFactor = 1.05
appearance.colors.primary = UIColor(named: "BrandPrimary")!
appearance.colors.background = .systemBackground
appearance.colors.componentBackground = .secondarySystemBackground
appearance.colors.componentBorder = .separator
appearance.colors.componentText = .label
appearance.colors.text = .label
appearance.colors.textSecondary = .secondaryLabel
appearance.cornerRadius = 12
appearance.borderWidth = 1
appearance.primaryButton.cornerRadius = 12

var shippingAddress = ShippingAddressElement.Configuration()
shippingAddress.appearance = appearance
shippingAddress.title = "Delivery address"
shippingAddress.buttonTitle = "Save delivery address"
configuration.shippingAddressElement = shippingAddress
```

Default address values come from `CheckoutElementsController.Configuration.Defaults`. The countries that customers can select come from [shipping_address_collection.allowed_countries](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-shipping_address_collection-allowed_countries) on the Checkout Session, not from the appearance object.

## Customize the Express Checkout Element 

Wallet providers control their logos, brand colors, and button content. You can select a [button theme](https://docs.stripe.com/payments/mobile/checkout-sessions/express-checkout-element/accept-a-payment.md?platform=ios#button-theme), set the buttons’ corner radius, and control how Stripe arranges them. Link buttons retain their required brand styling.

```swift
var appearance = ExpressCheckoutElement.Configuration.Appearance()

appearance.buttonTheme = .automatic
appearance.cornerRadius = 12
appearance.buttonLayout.maxColumns = 2
appearance.buttonLayout.maxRows = 1

var expressCheckout = ExpressCheckoutElement.Configuration(
    completion: onExpressCheckoutResult
)
expressCheckout.appearance = appearance
configuration.expressCheckoutElement = expressCheckout
```

## Customize the Currency Selector Element 

Use `labelContent` to display a currency code, a formatted amount, or the representation that Stripe selects for the purchase.

```swift
var appearance = CurrencySelectorElement.Configuration.Appearance()

appearance.contentVerticalPadding = 4
appearance.cornerRadius = 12
appearance.borderWidth = 1
appearance.border = .separator
appearance.background = .secondarySystemBackground
appearance.selectedBackground = .systemBackground
appearance.text = .label
appearance.selectedText = .label
appearance.textSecondary = .secondaryLabel
appearance.danger = .systemRed
appearance.font = UIFont(
    name: "AvenirNext-Medium",
    size: 14
)!
appearance.labelContent = .amount

var currencySelector = CurrencySelectorElement.Configuration()
currencySelector.appearance = appearance
configuration.currencySelectorElement = currencySelector
```

