# 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.

# Android


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

## Customize Payment Element 

Provide light and dark colors, and choose whether the Payment Element follows the system theme or always uses one color mode.

```kotlin
val colorsLight = PaymentElement.Configuration.Appearance.Colors.light()
    .primary(Color(0xFF635BFF))
    .surface(Color.White)
    .component(Color(0xFFF6F7F9))
    .componentBorder(Color(0xFFD8DEE4))
    .componentDivider(Color(0xFFD8DEE4))
    .onComponent(Color(0xFF1A1F36))
    .subtitle(Color(0xFF596780))
    .placeholderText(Color(0xFF8792A2))
    .onSurface(Color(0xFF1A1F36))
    .appBarIcon(Color(0xFF1A1F36))
    .error(Color(0xFFDF1B41))

val colorsDark = PaymentElement.Configuration.Appearance.Colors.dark()
    .primary(Color(0xFFB7B1FF))
    .surface(Color(0xFF171B24))
    .component(Color(0xFF242A36))
    .componentBorder(Color(0xFF3A4352))
    .componentDivider(Color(0xFF3A4352))
    .onComponent(Color.White)
    .subtitle(Color(0xFFB5BECC))
    .placeholderText(Color(0xFF8D98A8))
    .onSurface(Color.White)
    .appBarIcon(Color.White)
    .error(Color(0xFFFF6B82))

val appearance = PaymentElement.Configuration.Appearance()
    .colorsLight(colorsLight)
    .colorsDark(colorsDark)
    .themeMode(
        PaymentElement.Configuration.Appearance.ThemeMode.Automatic
    )

val paymentElementConfiguration = PaymentElement.Configuration()
    .appearance(appearance)

configuration.paymentElement(paymentElementConfiguration)
```

## Customize Shipping Address Element 

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

```kotlin
val appearance = ShippingAddressElement.Configuration.Appearance()
    .colorsLight(
        ShippingAddressElement.Configuration.Appearance.Colors()
            .primary(Color(0xFF635BFF))
            .surface(Color.White)
            .component(Color(0xFFF6F7F9))
            .componentBorder(Color(0xFFD8DEE4))
            .onComponent(Color(0xFF1A1F36))
            .onSurface(Color(0xFF1A1F36))
            .error(Color(0xFFDF1B41))
    )
    .colorsDark(
        ShippingAddressElement.Configuration.Appearance.Colors()
            .primary(Color(0xFFB7B1FF))
            .surface(Color(0xFF171B24))
            .component(Color(0xFF242A36))
            .componentBorder(Color(0xFF3A4352))
            .onComponent(Color.White)
            .onSurface(Color.White)
            .error(Color(0xFFFF6B82))
    )
    .themeMode(
        ShippingAddressElement.Configuration.Appearance.ThemeMode.Automatic
    )

val shippingAddressConfiguration = ShippingAddressElement.Configuration()
    .title("Delivery address")
    .buttonTitle("Save delivery address")
    .appearance(appearance)

configuration.shippingAddressElement(shippingAddressConfiguration)
```

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 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=android#button-theme), set the buttons’ corner radius, and control how Stripe arranges them. Link buttons retain their required brand styling.

```kotlin
val appearance = ExpressCheckoutElement.Configuration.Appearance()
    .buttonTheme(
        ExpressCheckoutElement.Configuration.Appearance.ButtonTheme.Automatic
    )
    .buttonLayout(
        ExpressCheckoutElement.Configuration.Appearance.ButtonLayout()
            .maxColumns(2)
            .maxRows(1)
    )
    .cornerRadiusDp(12f)

configuration.expressCheckoutElement(
    ExpressCheckoutElement.Configuration()
        .appearance(appearance)
)
```

## Customize Currency Selector Element 

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

```kotlin
val appearance = CurrencySelectorElement.Configuration.Appearance()
    .contentVerticalPaddingDp(4f)
    .cornerRadiusDp(12f)
    .borderWidthDp(1f)
    .borderColor(Color(0xFFD8DEE4))
    .background(Color(0xFFF6F7F9))
    .selectedBackground(Color.White)
    .textColor(Color(0xFF596780))
    .selectedTextColor(Color(0xFF1A1F36))
    .textSecondaryColor(Color(0xFF596780))
    .dangerColor(Color(0xFFDF1B41))
    .fontResId(R.font.avenir_next)
    .labelContent(
        CurrencySelectorElement.Configuration.Appearance.LabelContent.AMOUNT
    )

configuration.currencySelectorElement(
    CurrencySelectorElement.Configuration()
        .appearance(appearance)
)
```

