Primer Drop-in Checkout look and feel can be styled to suit your preferred branding and make it blend seamlessly in your website or mobile app.
This guide is designed to help you style our default Drop-in Checkout UI.
If you would like to build your own UI from scratch then consider integrating Headless Checkout.
This guide is designed to help you style our default Universal Checkout UI. If you would like to build your own UI from scratch then check out our Headless Universal Checkout guide.
Localization and languages
Universal Checkout supports multiple languages out of the box, enabling you to adapt its UI to the relevant market.
Universal Checkout uses the device language by default. If this language is not supported, Universal Checkout automatically falls back to English.
Supported locales
Language | Minimum versions |
---|---|
Danish |
|
German |
|
Greek |
|
English |
|
Spanish |
|
French |
|
Italian |
|
Norwegian |
|
Dutch |
|
Polish |
|
Portuguese |
|
Turkish |
|
Right-to-left
Universal Checkout automatically switches to a right-to-left layout when necessary.
Theme
To customize the appearance of the SDK, pass a theme
mapping under uiOptions
in PrimerSettings
, for example:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
uiOptions: { /* ... other options ... */ theme: { colors: { mainColor: { red: 7, green: 138, blue: 88, alpha: 255 }, background: { red: 216, green: 242, blue: 240, alpha: 255 }, text: { red: 7, green: 138, blue: 88, alpha: 255 }, disabled: { red: 100, green: 100, blue: 100, alpha: 255 }, error: { red: 235, green: 126, blue: 16, alpha: 255 }, borders: { red: 209, green: 96, blue: 209, alpha: 255 } }, darkModeColors: { mainColor: { red: 1, green: 255, blue: 1, alpha: 255 }, background: { red: 255, green: 1, blue: 255, alpha: 255 }, text: { red: 1, green: 255, blue: 1, alpha: 255 }, disabled: { red: 100, green: 100, blue: 100, alpha: 255 }, error: { red: 173, green: 10, blue: 10, alpha: 255 }, borders: { red: 209, green: 96, blue: 209, alpha: 255 } } }},
Minimally, you can set only mainColor
and background
to achieve a basic two-tone theme. Other properties can be used to override specific styles:
Property | Description |
---|---|
mainColor | The default primary color used to theme text and accents. |
background | The default background color for views. |
text | Overrides mainColor with a specific color for text labels. |
disabled | Overrides mainColor with a specific color for disabled buttons. |
error | A specific color for validation error label text. Red by default. |
borders | Overrides mainColor for button borders and view borders. |