Skip to content

Branding

The Branding page lets you customize how Latch UI components look on your site. Navigate to Settings > Branding in the dashboard.

Latch offers three tiers of customization:

The default. Latch UI components render with the standard Latch design system (purple accent, system font, 8px border radius). No configuration needed.

Apply your publication’s brand identity to all UI components. Configure:

  • Brand color — Primary button color, link color, and accent color (color picker + hex input)
  • Hover color — Button hover state
  • Logo — URL to your publication’s logo (SVG or PNG). Displayed in auth modals and paywalls.
  • Border radius — Roundness of buttons, inputs, and cards (0px to 24px slider)
  • Font family — Choose from common web fonts or specify a custom font stack
  • Custom text — Override default headings and descriptions:
    • Auth modal heading and description
    • Paywall heading, description, and CTA button text

Everything in Themed, plus a CSS editor that injects custom styles directly into the Shadow DOM of every Latch UI component. Use this for:

  • Changing text transforms, letter spacing, line heights
  • Custom button styles beyond color
  • Advanced layout adjustments
  • Targeting specific internal component classes
/* Example custom CSS */
.latch-btn-primary {
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 700;
}
.latch-modal {
max-width: 480px;
}

The branding editor includes a live preview panel on the right side of the page. It shows a rendered mockup of your auth form and paywall modal, updated in real-time as you change settings.

Switch between Auth and Paywall preview tabs to see how both components look with your configuration.

When a publisher loads @latch/ui on their site, the components automatically fetch the branding configuration from the Latch API using the publication’s publishable key:

GET /api/v1/branding
X-API-Key: pk_...

The response is cached for the page session. All components apply the branding on first render (or re-render once the config arrives).

  1. Publisher calls init({ apiKey: 'pk_...' }) to initialize the SDK
  2. Publisher imports @latch/ui — this triggers the branding fetch
  3. Components render with defaults, then re-render with branding when the fetch completes
  4. All subsequent component renders use the cached branding config

Branding values are applied in this priority order (highest wins):

  1. HTML attributes on the component (e.g. <latch-paywall-modal message="Custom">)
  2. Dashboard branding config (fetched from the API)
  3. CSS custom properties set on the element or ancestor (e.g. --latch-primary)
  4. Default values built into the component

This means publishers can still override specific values per-component using HTML attributes, while the dashboard branding provides publication-wide defaults.

GET /api/v1/branding
X-API-Key: pk_...

Returns the branding configuration. Used by UI components automatically. Only accessible with a publishable key (pk_).

GET /api/v1/branding/admin
Cookie: (session)
PUT /api/v1/branding/admin
Cookie: (session)
Content-Type: application/json
{
"brandingMode": "themed",
"brandColor": "#e74c3c",
"logoUrl": "https://example.com/logo.svg",
"borderRadius": "12",
"paywallHeading": "Become a member"
}

All fields are optional on PUT. Omitted fields are not changed. Set a field to null to clear it.

FieldTypeDescription
brandingMode"generic" | "themed" | "custom"Customization level
brandColorstring | nullPrimary color hex (e.g. "#e74c3c")
brandColorHoverstring | nullHover color hex
logoUrlstring | nullLogo image URL
borderRadiusstring | nullBorder radius in pixels (e.g. "12")
fontFamilystring | nullCSS font-family value
authHeadingstring | nullAuth modal heading
authDescriptionstring | nullAuth modal description
paywallHeadingstring | nullPaywall heading
paywallDescriptionstring | nullPaywall description
paywallCtaTextstring | nullPaywall CTA button text
customCssstring | nullCustom CSS (custom mode only)