Customize appearance
Customize your in-app integration with the Appearance API.
The Payment Element supports visual customization, which allows you to match the design of your app. The layout stays consistent but you can modify colors, fonts, and more by using the appearance property on your EmbeddedPaymentElement.Configuration object.
- Customize the font
- Customize colors to match your app
- Customize shapes like corner radius
- Fine-tune specific components
- Customize look and feel of Payment Element

Fonts
Customize the font by setting font.base to any variant of your custom font at any size and weight. The mobile Payment Element uses the font family of your custom font, but determines sizes and weights itself.
To increase or decrease the size of all text, set font.sizeScaleFactor. We multiply font sizes by this value before displaying them. This is useful if your custom font is slightly larger or smaller than the system font.
Colors
Customize the colors in the mobile Payment Element by modifying the color categories defined in Appearance.Colors. Each color category determines the color of one or more components in the UI. For example, primary defines the color of the Pay button and selected items like the Save this card checkbox. Refer to the diagram below to see some of the UI elements associated with each color category.

Note
To support dark mode, initialize your custom UIColors with init(dynamicProvider:).
Shapes
Besides fonts and colors, you can also customize the corner radius, border width, and shadow used throughout the mobile Payment Element.

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). Refer to Appearance.PrimaryButton for the full list of customization options.
Customization options for specific UI components take precedence over other values. For example, appearance.
overrides the value of appearance.
.
Note
Let us know if you think we need to add more customization options.
Payment Element
The Payment Element has the following styles: flat with radio buttons, flat with checkmarks, flat with disclosure icons, and floating buttons. Each style has specific options corresponding to that style.
Flat with radio

Flat with checkmark

Flat with disclosure
The FlatWithDisclosure style requires you to set the immediateAction
row selection behavior. After the customer selects a payment method, move them to a new screen (for example, back to your main checkout screen) because the row of their selected payment method won’t appear selected.

Floating button

Common row customizations
You can customize row properties that apply across all row styles: