Skip to main content

Widget Customization

Customize the NowRamp widget to match your brand and user experience requirements.

Theme Configuration

Basic Theming

const widget = new RampWidget({
  apiKey: 'your_api_key',
  projectId: 'your_project_id',
  externalUserId: 'user_123',

  theme: {
    primaryColor: '#6366F1',
    backgroundColor: '#FFFFFF',
    textColor: '#1F2937',
    borderRadius: '12px',
  },
});

Full Theme Options

OptionTypeDefaultDescription
primaryColorstring#6366F1Buttons, links, accents
primaryColorHoverstringautoPrimary color hover state
backgroundColorstring#FFFFFFWidget background
surfaceColorstring#F9FAFBCards, inputs background
textColorstring#1F2937Primary text color
textSecondarystring#6B7280Secondary text color
borderColorstring#E5E7EBBorder color
borderRadiusstring8pxCorner radius
fontFamilystringsystemCustom font family
successColorstring#10B981Success states
errorColorstring#EF4444Error states
warningColorstring#F59E0BWarning states

Dark Mode

const widget = new RampWidget({
  // ...
  theme: {
    primaryColor: '#818CF8',
    backgroundColor: '#111827',
    surfaceColor: '#1F2937',
    textColor: '#F9FAFB',
    textSecondary: '#9CA3AF',
    borderColor: '#374151',
  },
});

Custom Fonts

const widget = new RampWidget({
  // ...
  theme: {
    fontFamily: '"Inter", sans-serif',
  },
});
Make sure to include the font in your page:
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">

Branding

Configure your logo in the Partner Dashboard:
  1. Go to Project Settings > Branding
  2. Upload your logo or provide a URL
  3. Preview the widget with your logo
  4. Save to apply changes

Colors via Dashboard

  1. Go to Project Settings > Widget Branding
  2. Set your primary color
  3. Preview changes in real-time
  4. Save to apply

Layout Options

Size Presets

// Compact
const widget = new RampWidget({
  // ...
  layout: 'compact', // 360x500
});

// Standard (default)
const widget = new RampWidget({
  // ...
  layout: 'standard', // 400x600
});

// Full
const widget = new RampWidget({
  // ...
  layout: 'full', // 100% width, min 600px height
});

Custom Dimensions

<iframe
  src="..."
  width="450"
  height="650"
  style="max-width: 100%;"
></iframe>

Localization

Supported Languages

CodeLanguage
enEnglish (default)
esSpanish
frFrench
deGerman
ptPortuguese
itItalian
jaJapanese
koKorean
zhChinese (Simplified)

Setting Language

const widget = new RampWidget({
  // ...
  locale: 'es', // Spanish
});

Auto-detect Language

const widget = new RampWidget({
  // ...
  locale: navigator.language.split('-')[0], // Browser language
});

Currency Configuration

Restrict Available Currencies

const widget = new RampWidget({
  // ...
  allowedCryptoCurrencies: ['BTC', 'ETH', 'USDC'],
  allowedFiatCurrencies: ['USD', 'EUR'],
});

Default Selections

const widget = new RampWidget({
  // ...
  defaultCrypto: 'ETH',
  defaultFiat: 'USD',
  defaultAmount: '100',
});

Behavior Customization

Disable Steps

const widget = new RampWidget({
  // ...
  skipWalletStep: true, // Pre-fill wallet required
  walletAddress: '0x...',
});

Auto-close on Complete

const widget = new RampWidget({
  // ...
  closeOnComplete: true,
  closeDelay: 3000, // ms
});

widget.on('orderComplete', () => {
  // Widget closes automatically after 3s
});

Disable Animations

const widget = new RampWidget({
  // ...
  animations: false,
});

CSS Customization

For iframe embeds, wrap in a styled container:
<style>
  .widget-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    margin: 0 auto;
  }

  .widget-wrapper iframe {
    display: block;
    width: 100%;
    height: 620px;
    border: none;
  }

  @media (max-width: 480px) {
    .widget-wrapper {
      border-radius: 0;
      box-shadow: none;
    }

    .widget-wrapper iframe {
      height: 100vh;
    }
  }
</style>

<div class="widget-wrapper">
  <iframe src="..." />
</div>

Project-Level Defaults

Set defaults for all widget instances in your project via the Partner Dashboard:
  1. Go to Project Settings > Widget Configuration
  2. Configure default values:
    • Default cryptocurrency (e.g., ETH)
    • Default fiat currency (e.g., USD)
    • Theme colors and styling
    • Default locale
  3. Save to apply changes
These project-level defaults can be overridden per-widget instance using the SDK options.

Testing Customizations

Use the sandbox to test your customizations:
const widget = new RampWidget({
  apiKey: 'ramp_test_abc123', // Sandbox key
  projectId: 'project_xyz789',
  externalUserId: 'test_user',
  // Your customizations
});