Skip to main content

Visual Customisation Theme

The theme sets the colour of modal buttons and the selected-card border.
Ekran Resmi 2026 06 08 16 08 40
Ekran Resmi 2026 06 08 16 08 40
Custom logoUrlvs. a Default Connexease logo:
Image
Heads-up: the logo is loaded by the browser as a normal <img>. If your image host has hotlink protection or restrictive CORS/Referer rules, the logo may load on one domain but break on another. Host the logo somewhere that allows cross-origin embedding (your own domain or a public CDN).

Custom CSS URL

Connexease Embedded Signup SDK ships with its own default modal styles. The modal works without any additional setup. If a customer wants to fully restyle the SDK-owned modal from their own application, pass a customer-owned stylesheet with customCssUrl.

Usage

Host a CSS file from the customer application or CDN:
Then pass it to init():
When a relative URL is used, it is resolved from the customer’s own origin. For example, if the customer panel runs at https://customer.example/settings, then /your-modal-theme.css resolves to:

How It Works

The SDK first injects its bundled modal CSS into the modal Shadow DOM. Then it loads the customer CSS file from customCssUrl in the same Shadow DOM as a link rel="stylesheet". The order matters: because the customer stylesheet is loaded after the SDK stylesheet, it can override the same selectors.
The gate style is added only when customCssUrl is provided. The modal stays hidden until the custom CSS file finishes loading, so the default SDK modal design does not flash briefly before the customer design appears. If the CSS file fails to load or takes too long, the SDK removes the gate and continues with the default/token design so onboarding is not blocked.

Example CSS

Supported Styling Selectors

The customer stylesheet runs inside the SDK modal Shadow DOM, so it can target the modal selectors listed below.

Connection Type Modal Selectors

Meta Login Wait and Processing Selectors

CSS Changes Appearance, Not HTML Structure

customCssUrl can change the modal appearance:
  • colours
  • fonts
  • spacing
  • borders and radius
  • shadows
  • modal width and height
  • button and card styling
  • success/error/warning icon presentation
  • responsive behaviour
It cannot change the HTML structure. Adding new elements, removing existing elements, or changing class names requires an SDK code change.

Using Custom CSS with Theme Tokens

customCssUrl can be used together with the existing theme token system:
In this case:
  1. The SDK loads its default CSS.
  2. The customer CSS file is loaded after the default CSS.
  3. Theme token values are applied as inline custom properties on the Shadow DOM host.
If the same --gw-* variable is provided both in theme and in the CSS file, the theme value wins.

Priority Rules

The final styling depends on what the customer CSS overrides.

Same CSS Variable: Theme Token Wins

Result: --gw-primary is #0B7A4E. Reason: theme token values are written as inline custom properties on the Shadow DOM host, so they override :host { --gw-primary: red; } from the stylesheet.

Direct Selector Property: Customer CSS Wins

The SDK default CSS uses the token like this:
The customer passes a theme token:
But the customer CSS file sets the button background directly:
Result: the .btn--primary background is purple. Reason: the customer stylesheet directly overrides the SDK default background: var(--gw-primary) declaration. Short rule:
  • theme token vs. --gw-* variable in the CSS file: the theme token wins.
  • theme token vs. direct selector property in the CSS file: the customer CSS file wins.

Partial CSS Is Supported

Customers do not need to rewrite the whole modal stylesheet. They can provide only the selectors and properties they want to change.
Only the modal width and primary button radius change. Everything else continues to come from the theme tokens or SDK default CSS.

Security and URL Rules

Accepted customCssUrl values:
  • Same-origin relative URL: /your-modal-theme.css
  • HTTPS absolute URL: https://cdn.customer.example/your-modal-theme.css
  • Loopback HTTP for local development: http://localhost:3000/your-modal-theme.css
Rejected examples:
Invalid values do not break onboarding. The SDK ignores the stylesheet, logs a console warning, and emits a config_warning event through onEvent.

Custom CSS CSP Note

If the customer application uses Content Security Policy, allow inline SDK styles and the custom stylesheet origin:
For a same-origin CSS file, 'self' is enough. If the CSS file is hosted on another CDN origin, add that origin to style-src:
The SDK injects its default CSS into the Shadow DOM as an inline <style>, so 'unsafe-inline' is required when a CSP is present. This section only covers CSP requirements for modal styling. For the complete Meta popup, relay iframe, script, and API policy, see Browser Security Headers.