Theming

A tenant sets ten values. Everything else is computed from them at runtime, so a brand nobody designed against still produces readable text, a visible focus ring and a hover state that reads as one.

The same components, four tenants

Nothing below is styled per tenant. Each surface sets a brand colour, and in one case a 2px radius, and every hover, border and foreground follows from it.

Aria

BrandPaidPendingOverdue

As registered

Two invoices need review

Both are over the approval threshold.

Emerald Freight

BrandPaidPendingOverdue

As registered

Two invoices need review

Both are over the approval threshold.

Violet Capital

BrandPaidPendingOverdue

As registered

Two invoices need review

Both are over the approval threshold.

Sand & Co

BrandPaidPendingOverdue

As registered

Two invoices need review

Both are over the approval threshold.

The switcher in the header applies a tenant to every page, so any component can be read under any of them.

What a tenant sets

Ten values, deliberately. A longer list is a longer conversation with every new client, and a shorter one cannot express a brand.

  • colorBrandThe primary surface: filled buttons, emphasis backgrounds.
  • colorAccentInteraction: focus rings, links, accent borders.
  • colorBackgroundThe page behind everything.
  • colorTextBody text, and the scale of muted text under it.
  • colorSuccessConfirmed, paid, active.
  • colorWarningWaiting on someone, or close to a limit.
  • colorDangerFailed, overdue, destructive.
  • colorInfoNeutral information the user did not ask for.
  • borderRadiusThe base radius. Every step scales from it.
  • fontFamilyOne family, applied everywhere.

What is derived

Readable foregrounds

The text on a filled surface is picked against the surface it sits on, so a pale brand gets dark text and a dark brand gets light text. A tenant cannot ship an unreadable button.

Interaction states

Hover, pressed, selected and disabled are steps from the base colour rather than values anyone sets. That is why they stay consistent across components.

The radius scale

Every step scales from the base, so a sharp-cornered brand is sharp everywhere rather than only where someone remembered.

Applying one

Derive the theme once, high in the tree, and every component below reads it. The derivation runs on the server, so there is no flash of unthemed content. With no theme applied at all the components fall back to the values below.

  • colorBrand#002b33
  • colorAccent#008068
  • colorBackground#ffffff
  • colorText#09090b
  • colorSuccess#008068
  • colorWarning#c78500
  • colorDanger#e60000
  • colorInfo#0284c5
  • borderRadius6px
  • fontFamilyvar(--font-inter), system-ui, sans-serif
  • logoUrlnull