Skip to main content
Frames adopt your brand at runtime. Pass a brand color, and the frame derives its whole palette, light and dark, from it. Text and background pairs meet WCAG AA contrast by default. Add a custom theme to change border radius, palette, and how much of your brand color the frame shows.

Supported frames

The auth frame applies brandColor and customTheme. The connect, widget, Buy Button, add card, challenge, check, and reset frames ignore both params, so you can set them once on the SDK client without errors.

Quick start

To add a custom theme, pass it as JSON in customTheme. Build the query string with URLSearchParams so the JSON is URL-encoded:

With the SDK

Set brandColor and customTheme on the client-level theme. The SDK adds them to every frame it opens. Pass customTheme as an object, and the SDK serializes it.

Initialization parameters

brandColor accepts hex with or without the # (URL-encode it as %23), three-digit shorthand, 0xFF6B00, rgb(), rgba(), and oklch(). If the value isn’t a color, the frame ignores it.

Custom theme

borderRadius and palette apply only when you also pass brandColor. The frame validates each field and ignores invalid or unknown ones. If the value isn’t valid JSON or is longer than 4 KB, the frame ignores the whole param.

Border radius

Color scheme

Both palettes derive from the same brandColor. If you also pass the theme param (light or dark), it wins over colorScheme. The SDK’s appearance option sets theme.

Palette

To meet the contrast target, the frame can shift the accent away from your exact brand color, more often in dark mode.

Brand style

With the SDK, set this as customTheme.brandStyle.

Troubleshooting

The frame renders in default MoonPay colors. Check that the frame is a supported frame and that brandColor is a color. If you include the #, URL-encode it as %23. My customTheme doesn’t apply. Check that the value parses as JSON once URL-decoded, and that you also pass brandColor. How can I confirm theming is applied? Inspect the frame’s <head> in your browser’s devtools. A <style data-partner-theme> element means your theme is active.