Skip to main content
Embed can be customized to match your brand using the theme property. The theme property allows you to set common styles such as the font, color, and border styles.

Overview

Embed is a composition of UI components such as a Payment Header, Content and Lists. These components can change over time and so direct styling of these is not supported. The following diagram shows an example of how basic theming is applied. Embed styles are derived from the theme values you provide.
Theming options
When customizing the visual appearance using theming options, please ensure your design meets accessibility standards set by the European Accessibility Act (EAA). Make sure your color choices have enough contrast and your text is easy to read for all users.

Usage

To apply a theme, embed can be passed an Object containing Theme Options. The theme options override the default theme.

Options

Fonts

Fonts can be customized with a valid CSS property.
Using Google FontsFonts prefixed with google: are downloaded automatically from Google Fonts. This allows you to choose the closest font to your brand. We recommend choosing a font with support for the weights 400, 600 and 700.

Colors

Colors are named semantically, for example primary or danger. This allows new features or UI elements to be introduced without explicitly requiring you to update your theme. As an example, a ‘Default Card’ button may be introduced at a later stage that would be based on the danger set of colors.

Borders Widths

Borders can be set using an alias of thin for a 1px border width or thick for a 2px border width.

Radii

Radii can be set to either none, subtle or rounded. These aliases correspond to 0, 2px and 4px. Setting the radii to none removes it entirely.

Focus Ring

The focus ring is set using a CSS box-shadow instead of the default browser focus ring. It can be overridden, but keeping a visible focus ring for accessibility is advised. This overrides any focus styles set elsewhere in the theme.

FAQ

Adding your own styles directly via CSS is currently not supported. Using a theme allows updates to be rolled out and ensures compatibility with new features.
Theming is currently supported in all modern browsers including Microsoft Edge. Some browsers like Internet Explorer 11 are not supported, and in these the default theme is used.
Values can be a valid CSS property value. for example colors.primary could be a hex, RGB or HSL. You can also have multiple shadows for a focus ring, for example 0 0 0 2px white, 0 0 0 4px green