Skip to content
Intents Checkout

Appearance

Theme the checkout: dashboard branding, the appearance object's variables and rules, the stable .ifc-* class names, and what can never be hidden.

The checkout can look like your store at three levels, and the customer-safety elements are the same at all of them:

  1. Branding, set once in the dashboard at dashboard.intents.fi/branding: your name, logo, colours, font, corner radius and a few button labels. It applies everywhere, the hosted page included.
  2. appearance, passed in code to <PayButton>, <CheckoutEmbed> or checkout.js (Embedded widget). It is layered over your branding for that one page.
  3. Headless: your own UI, with the safety elements rendered by you (Headless checkout).

Each layer is checked before it is used. A value that would make the checkout hard to read falls back to the layer under it, never to nothing, and the reason is reported: in the dashboard for branding, as a console warning for appearance.

The checkout is light only. One merchant accent cannot be readable on both a light and a dark background, so there is no dark or automatic theme: set light backgrounds and dark text.

type Appearance = {
theme?: "light"; // the only value; anything else is ignored
variables?: {
colorBackground?: string;
colorText?: string;
colorAccent?: string;
colorButton?: string;
colorButtonText?: string;
fontFamily?: string;
fontUrl?: string;
borderRadius?: number | string;
spacingUnit?: number | string;
};
rules?: Record<string, Record<string, string | number>>;
};

The same object works in all three embeds. checkout.js hands it to the frame over postMessage.

Variable What it sets Checked
colorBackground the page with colorText: text must be at least 4.5:1 on it
colorText body text. Muted text is derived from it, only as far as 4.5:1 allows with colorBackground
colorAccent links and highlights at least 4.5:1 on the background, or the text colour is used
colorButton the primary button with colorButtonText: at least 4.5:1
colorButtonText the primary button’s label with colorButton
fontFamily the body font: one of the supported Google Fonts below an unlisted family is dropped
fontUrl your own font, as an https: URL to a .woff2 file. Wins over fontFamily anything else is dropped
borderRadius corners, in px (12 or "12px"), 0 to 24 capped at 24
spacingUnit the spacing base, in px, 2 to 8. The default is 4 outside the range, the default is used

Colours are checked in pairs: set a dark colorBackground without a colorText and the pair is checked against the text colour underneath, so dark text on a dark page is refused rather than shipped. Changing the page colours also inverts the default button to match, unless you set the button colours yourself.

Addresses, amounts and transaction references are always in a monospaced face, whatever font you choose, so every character can be checked.

Supported Google Fonts: Newsreader, Source Serif 4, Literata, Lora, Merriweather, EB Garamond, Fraunces, Inter, IBM Plex Sans, Work Sans, Manrope, DM Sans, Nunito Sans, Rubik, Space Grotesk. Each has lining numerals and reads at 13 px, which the amount and the address captions need.

rules restyles single elements, keyed by a stable class name:

rules: {
".ifc-Button": { borderRadius: "999px", textTransform: "uppercase" },
".ifc-Button:hover": { backgroundColor: "#2B4562" },
".ifc-Option": { borderWidth: 2 },
".ifc-Amount": { fontWeight: 500 },
}

A rule is your CSS running next to a customer’s money, so it is compiled, never passed through:

  • Selectors are one .ifc-* class from the list below, optionally with a --modifier, optionally with one state: :hover, :focus, :focus-visible, :disabled or ::placeholder. No descendant, sibling or attribute selectors, so a rule cannot reach outside the checkout.
  • Properties may be written in camelCase or kebab-case, from this list only: color, background-color, border, border-color, border-style, border-width, border-top, border-bottom, border-left, border-right, border-radius, box-shadow, outline-color, font-family, font-size, font-style, font-weight, letter-spacing, line-height, text-align, text-decoration, text-transform, padding (and its four sides), transition. A bare number on a length property is read as px.
  • Values cannot open a block, end a declaration, load a URL (url(…), @import) or run an expression, and are at most 200 characters.

Some values are refused because they would make the payment hard to read or push it off a phone screen:

Refused Why
display, visibility, opacity, position, transform, width, height, margin, clip-path, content, and every other property not listed they hide, move, clip or shrink an element
outline, outline-offset (only outline-color is allowed) a wide outline paints over everything, the address included
font-size under 12 px (in px, rem or em) an amount or an address must be readable on a phone
padding over 48 px it pushes the safety elements off a 375 px screen
line-height under 1 lines of text would overlap
letter-spacing beyond ±0.25em (or ±4 px) characters of an address run together or apart
font-family on .ifc-Mono, .ifc-AmountExact, .ifc-AddressValue they stay monospaced, so an address can be checked character by character
color / background-color under 4.5:1 against what the element sits on the same contrast bar as the theme

A refused rule or declaration is dropped with a warning; the rest of your rules still apply.

These are the public contract: renaming one would break your rules, so they do not change. The list is IFC_CLASSES, exported from @intents-fi/react.

Class Element
.ifc-Root the checkout’s outer element (a rule on it targets the checkout as a whole)
.ifc-Page, .ifc-Sheet, .ifc-ModalSheet the page, the card the checkout sits on, the <PayButton> sheet
.ifc-Merchant your name and logo
.ifc-Amount the price, in USD, at the top
.ifc-Title, .ifc-H3, .ifc-Body, .ifc-Small, .ifc-Caption, .ifc-Muted text styles
.ifc-Mono monospaced text: references and hashes
.ifc-Rule a dividing line
.ifc-Button every button
.ifc-Field, .ifc-Label, .ifc-Input, .ifc-Error form fields, their labels, inputs and errors
.ifc-Notice, .ifc-Pill a notice box, a status pill
.ifc-OptionList, .ifc-Option, .ifc-OptionMain, .ifc-OptionSide the “pay with” list, one row of it, and the row’s two sides
.ifc-Address a copyable row: the exact amount or the deposit address, with its copy button
.ifc-AmountExact the exact amount to send, inside its row
.ifc-AddressValue the deposit address, inside its row
.ifc-Qr, .ifc-QrFrame the QR code and its frame
.ifc-Stepper, .ifc-Step, .ifc-StepMark, .ifc-StepLabel, .ifc-Check the progress steps after paying
.ifc-Breakdown the price breakdown, network fee included
.ifc-ChainWarning the network warning
.ifc-Countdown the expiry countdown
.ifc-RefundField the refund address field
.ifc-Footer the footer: “Powered by intents.fi” and the support email

Whatever you set, the customer always sees:

  • the exact amount to send,
  • the network warning (“Send USDT on TRON only.”),
  • the deposit address and its QR code,
  • the expiry countdown,
  • the refund address field,
  • and the Powered by intents.fi line.

No variable or rule can remove, hide, cover or shrink them: the properties that could are not on the list. In a headless checkout you render the safety elements yourself, and assertRequiredRendered checks that you did.

The branding page sets the same things for every checkout of yours: display name, logo (an https: image), accent, background, text, muted text, surface and button colours, the font (one of the Google Fonts above, or an uploaded .woff2), the corner radius and the support email shown in the footer. It refuses a colour pair under 4.5:1 before saving, and the checkout checks again when it renders.

It also takes a few copy overrides: the labels a merchant has a reason to change.

Key Longest What it replaces
connectWallet 40 Connect wallet
payAnotherWay 60 Pay from an exchange or another wallet
getAddress 60 Show me where to send it
paidTitle 40 the paid screen’s heading
successMessage 280 nothing by default: an extra message on the paid screen
returnButton 60 Return to {merchant}

An override is plain text. The safety wording (the network warning, “send exactly”, the refund address explanation) cannot be overridden, and an override that uses words a customer should not have to know (“bridge”, “gas”, “slippage” and the like) is refused with a warning.