Style Messaging
Fonts
Afterpay Messaging inherits the font family that is used to style other paragraph elements on the page. If you would like to use a different font, you may specify it in a CSS rule that targets afterpay-placement:
Adjust the Size of Afterpay Messaging
Use the data-size attribute to change the font-size of the messaging and also to scale the brand logo.
Accepted values for the data-size attribute are: xs, sm, md (default), and lg. That is extra small, small, medium and large.
To scale the messaging elements beyond these standard options provided by the data-size attribute, use the following custom CSS properties:
-
--logo-badge-width: To change the size of the brand logo only (badge) -
--messaging-font-size: To set the font-size of the textual part of the messaging to a custom value
See the code example below:
To ensure your customizations align with our brand guidelines see the following links:
Logo Types
Badge Themes
See the Examples page for implementations.
Modal Themes
Add the attribute data-modal-theme to the <afterpay-placement> tag to use an alternate background color on the Afterpay Modal.
Accepted values are: white, mint




