Skip to main content
CrossmintEmbeddedOfframp takes an appearance prop with the same object as the embedded checkout. For the full list of variables and rules in that object, see the onramp UI Customization guide. This guide covers which of them the offramp screens use, what each one changes, the default values, and how to test your theme.

Prerequisites

Before You Start

  • If checkout already uses your brand, pass the same appearance object to the offramp.
  • Every setting is optional. A setting that you do not set uses the Crossmint default.
  • If a value does not fit the appearance schema, such as a color that is not a valid CSS color or a value of the wrong type, the offramp ignores all of your settings and shows the default look.
  • If a value contains CSS syntax, such as ;, {, }, <, >, @, url(, a CSS comment, a backslash, or an unbalanced quote or parenthesis, the offramp drops only that value and uses the default for it. A fonts URL on a host that the offramp does not accept (see Fonts, Sizes, and Corners), or with a quote, a backslash, <, >, or a line break, is dropped the same way.
  • No error message shows in either case, so test after each change.
  • The identity verification step inside the offramp uses the same appearance. See Identity Verification UI Customization for those screens.

Apply Your Theme

Define the appearance object once, outside your components:
offrampAppearance.ts
Then pass it to the appearance prop. Keep the other props and events from the quickstart.
components/Withdraw.tsx
The Enter amount screen with the default look, and with the theme above:
The offramp's Enter amount screen twice: on the left with the default light look and a green accent, on the right with the dark theme from this guide, a blue accent, and the Manrope font

Appearance Settings and Where They Apply

Color settings live under appearance.variables.colors, and component rules under appearance.rules. On every screen, backgroundPrimary is the background and textPrimary is the default text color. The background fills the whole component, including the padding around the screens. The panel fill is calculated from those two colors (see Default Colors). The checkout settings rules.DestinationInput, rules.ReceiptEmailInput, rules.FeeSummary, and rules.GlobalMessage have no effect on the offramp.

Default Colors

The screens use these colors when you do not set a value. Change only the colors that differ from your brand. The panel fill is 7% of textPrimary mixed into backgroundPrimary. In light mode, the button text and its hover text take your backgroundPrimary color unless you set them. The hover text is a separate setting from PrimaryButton.colors.text, so set PrimaryButton.hover.colors.text too when you change the button text.

Light and Dark Mode

There is no theme setting. The offramp picks the light or dark defaults from variables.colors.backgroundPrimary:
  • An opaque dark color (for example #1E2023) selects the dark defaults.
  • A light color, a transparent or semi-transparent color, or no value selects the light defaults.
The colors that you set replace only those values. If your app has a light mode and a dark mode, pass the appearance that matches the mode the user sees.
To get the dark look without picking every color yourself, set backgroundPrimary to a dark color and leave the rest unset.

Fonts, Sizes, and Corners

rules.Label, rules.Input, and rules.PrimaryButton can set their own font, and rules.Input and rules.PrimaryButton their own borderRadius. For the component’s height and width, see Sizing.

What You Cannot Change

Test Your Theme

Try your appearance values in your own app against a staging project, with staging API keys, before you use them in production. The component reloads the offramp when the value of appearance changes, so each change shows on the next load. Pick the theme before you render the component rather than while a user is withdrawing. Run these checks in staging before you go live:
  • Check light mode and dark mode, if your app has both.
  • Check Enter amount, Withdraw to, Add a bank account, and Review & confirm.
  • Enter an amount below the minimum and check that the error color shows.
  • Check the hover and disabled states of the button. Next stays disabled until the user picks a bank account and enters an amount.
  • Check the identity verification step with a user who is not verified yet.

Next Steps

Embedded Offramp Reference

Props, events, statuses, and sizing

Identity Verification UI Customization

Style the KYC step inside the offramp