There are two ways to style the SDK:
- In code (iOS, Android and React Native): pass an
Appearanceobject on theTransactionConfig(covered below). Web has noappearanceoption. See the Web tab for what you style in code. - From the Checkout Builder: configure styles server-side in your Yuno Dashboard, no code needed.
- Web
- iOS
- Android
- React Native
The Web SDK renders into your page as regular DOM, so you style it with CSS plus a few config fields. There is no Each field is its own iframe, so pass
appearance object on Web.What you can style
CSS classes
Every element the SDK renders on your page carries a class with thesdk-payments- prefix. Target them from your stylesheet to customize colors, spacing, borders, and other visual properties. Common classes include:CSS classes may change between SDK versions. Inspect the rendered DOM in your browser’s developer tools to find the current class names.
Styling card iframes
Card number, expiry, and CVV render inside iframes for PCI compliance. Your page CSS cannot reach them. Usecard.styles to inject CSS and card.fonts to load custom fonts inside the iframes.Custom fonts
card.fonts loads font files inside the card iframes. It does not apply them: reference the family by name in card.styles, as in the example above.The iframes load the files from a different origin than your page, so the font host must allow cross-origin requests (send an
Access-Control-Allow-Origin header). If a file fails to load, the field falls back to the next font in your font-family stack.Input design types
TheinputDesignType field controls how labels and placeholders appear on form inputs:Wallet button options
Customize express wallet buttons through themount() options or externalButtons on the config:Secure fields styling
For Secure Fields, passstyles and externalFonts in the options of each field when you create it:externalFonts to every field that uses the font. The entries have the same shape as card.fonts, but the family key is family_name (snake case), not familyName. The same cross-origin requirement applies.Related
TransactionConfig. Whereappearanceis passed.