Skip to main content

Overview

Yuno SDK provides extensive customization options so the checkout experience matches your brand. You can configure themes, colors, typography, and layout through the SDK initialization or the Checkout Builder in the Dashboard.

Theme Configuration

Pass a theme object during SDK initialization to customize the appearance:
const yuno = Yuno.initialize('your-public-api-key');

// Pass theme options when configuring checkout via startCheckout() or startSeamlessCheckout()
yuno.startCheckout({
  checkoutSession: 'checkout-session-id',
  countryCode: 'BR',
  language: 'en',
  elementSelector: '#yuno-checkout',
  yunoCreatePayment: async (oneTimeToken) => {
    // Create payment server-side
  },
});
Theme properties can be configured via the Checkout Builder in the Dashboard or through CSS variables (see below).

Available Theme Properties

PropertyTypeDefaultDescription
primarystring#0066FFPrimary action color (buttons, links)
secondarystring#6B7280Secondary elements color
backgroundstring#FFFFFFForm background color
textstring#1F2937Primary text color
errorstring#EF4444Error state color for fields and messages
successstring#10B981Success state color
borderRadiusstring4pxBorder radius for inputs and buttons
fontFamilystringSystem defaultFont family for all text elements
fontSizestring14pxBase font size

Dark Mode

Enable dark mode by setting the mode property:
theme: {
  mode: 'dark',
  primary: '#60A5FA',
  background: '#1F2937',
  text: '#F9FAFB',
}
When mode: 'dark' is set, the SDK automatically adjusts contrast ratios for accessibility compliance. You can still override individual colors.

Layout Options

Control the checkout layout for Full Checkout and Lite Checkout:
yuno.startCheckout({
  checkoutSession: 'checkout-session-id',
  countryCode: 'BR',
  language: 'en',
  elementSelector: '#yuno-checkout',
  yunoCreatePayment: async (oneTimeToken) => {
    // Create payment server-side
  },
});
yuno.mountCheckout();

Secure Fields Styling

For Secure Fields, use the styles object to match your form design:
const secureFields = yuno.mountSecureFields({
  styles: {
    base: {
      fontSize: '16px',
      color: '#333',
      fontFamily: 'Inter, sans-serif',
      padding: '12px',
      '::placeholder': { color: '#9CA3AF' },
    },
    focus: {
      borderColor: '#0066FF',
      boxShadow: '0 0 0 2px rgba(0, 102, 255, 0.2)',
    },
    error: {
      color: '#EF4444',
      borderColor: '#EF4444',
    },
    valid: {
      borderColor: '#10B981',
    },
  },
});

Checkout Builder (No-Code)

For non-technical customization, use the Checkout Builder in the Dashboard:
1

Navigate to Dashboard > Checkout Builder

2

Select colors, fonts, and layout preferences visually

3

Preview changes in real time

4

Publish to apply changes across all SDK integrations

SDK-level theme configurations override Checkout Builder settings. If you set themes programmatically, Dashboard changes will not take effect.

Localization

The SDK automatically detects the user’s locale. Override it explicitly:
const yuno = Yuno.initialize('your-public-api-key');

yuno.startCheckout({
  checkoutSession: 'session-id',
  countryCode: 'BR',
  language: 'pt',   // 'en' | 'es' | 'pt'
  elementSelector: '#yuno-checkout',
  yunoCreatePayment: async (oneTimeToken) => {
    // Create payment server-side
  },
});
yuno.mountCheckout();