ByteChef LogoByteChef
Embedded

Theming and Localization

Reference for styling the embedded surfaces, and the parts of the embedded UI that cannot be changed.

The embedded surfaces render inside your product: the Automation Hub, the Integration Marketplace and the workflow builder in an iframe, and the Connect and activation dialogs directly in your page. This page lists which styling options each surface accepts, and which parts of the UI are fixed.

Styling options by surface

SurfaceHow it rendersStyling options
Automation Hubiframe (automation-hub.html)theme prop. Also applies to the workflow builder and the dialogs that the hub opens.
Integration Marketplaceiframe (integration-marketplace.html)theme prop. theme.mode is passed to the Connect dialog that the marketplace opens.
EmbeddedWorkflowBuilderiframe (workflow-builder.html)None. Renders the default light theme.
Connect dialog (useConnectDialog)In your pagemode option and --bytechef-dialog-* CSS variables.
Activation dialog (useActivationDialog)In your pagemode option and --bytechef-dialog-* CSS variables.

The theme prop

AutomationHub and IntegrationMarketplace accept the same theme object. Every key is optional. A key you do not set keeps the default value.

<AutomationHub
    jwtToken={jwtToken}
    theme={{
        borderRadius: '0.5rem',
        fontFamily: 'Inter, system-ui, sans-serif',
        mode: 'dark',
        primaryColor: '#2563eb',
    }}
/>
KeyTypeEffect
mode'dark' | 'light'Color scheme. Any value other than 'dark' renders light.
primaryColorcolorButtons, focus rings and brand accents. The text color on top of it is set to black or white, whichever has more contrast.
fontFamilystringValue of the font-family used by the surface.
borderRadiuslengthCorner radius. Accepts px, rem, em or %, for example 8px or 0.5rem.
surfaceColorcolorPage background.
cardColorcolorCards, dialogs and popovers.
activeBorderColorcolorBorder of enabled automation cards.
enableColorcolorEnable button.
disableColorcolorDisable button.
onAccentColorcolorText on accent-colored surfaces.
segmentColorcolorSelected item in segmented controls.
cssVariablesRecord<string, string>Additional CSS custom properties, for example {'--my-variable': '4px'}. Keys that do not start with -- are ignored.

Validation

  • A color is a hex value (#2563eb, #25e) or any value the browser accepts as a CSS color (rgb(37 99 235), rebeccapurple). An unrecognized color is ignored.
  • A borderRadius that is not a number followed by px, rem, em or % is ignored.
  • cssVariables values are not validated.

Fonts

The surface renders in an iframe, so @font-face rules declared in your page do not apply inside it. Use a font that the iframe can load without your stylesheet, such as a system font stack.

Updating the theme

When the theme prop changes, the component sends the new values to the iframe. The iframe does not reload.

Styling the Connect and activation dialogs

The Connect dialog and the activation dialog render in your page, not in an iframe.

mode

Both useConnectDialog and useActivationDialog accept mode: 'dark' | 'light'. The default is 'light'. 'dark' switches the default surface, border, text and hover colors to a dark palette.

CSS variables

The dialogs read the following CSS custom properties. Set them on :root or on any ancestor of the dialog. A variable you do not set uses the default for the current mode.

VariableApplies toLight defaultDark default
--bytechef-dialog-surfaceDialog background#fff#111827
--bytechef-dialog-surface-raisedRaised areas inside the dialog#fff#1f2937
--bytechef-dialog-borderBorders#e5e7eb#374151
--bytechef-dialog-textText#0a0a0a#f9fafb
--bytechef-dialog-text-mutedSecondary text#6b7280#9ca3af
--bytechef-dialog-hoverHover backgrounds#f1f5f9#374151
--bytechef-dialog-primaryPrimary buttons and accents#1071e5#1071e5
--bytechef-dialog-primary-hoverPrimary button hover#0b50a3#0b50a3
--bytechef-dialog-primary-foregroundText on primary buttons#fff#fff
:root {
    --bytechef-dialog-primary: #2563eb;
    --bytechef-dialog-primary-hover: #1d4ed8;
    --bytechef-dialog-surface: #ffffff;
}

When the Automation Hub opens a dialog, it sets these variables from its theme: primaryColor sets the three primary variables, cardColor sets the surface and text variables, surfaceColor sets the hover variable, and activeBorderColor sets the border variable.

Localization

Coming soon

Localization of the embedded surfaces is not available. No surface accepts a locale.

All embedded surfaces display their labels, messages and validation errors in English. No component or hook accepts a locale or replacement text.

Fixed elements

The following parts of the embedded experience cannot be configured from the SDK.

ElementBehavior
Labels and messagesFixed text, in English, on every surface. This includes validation messages in the Connect dialog.
Connect dialog footerAlways shows a Powered by ByteChef link.
Standalone workflow builder appearanceEmbeddedWorkflowBuilder has no theme prop and renders the default light theme. To apply a theme to the builder, open it from the Automation Hub.
Engine error messagesShown in English in execution history, as produced by the workflow engine and the components.
Component documentation linksComponent help in the workflow builder links to the ByteChef documentation.

Host names and URLs

The iframes load from the baseUrl you pass to the SDK components, and the APIs and webhook URLs are served by the same ByteChef deployment. On a self-hosted deployment you choose its host names:

VariableControlsDefault
BYTECHEF_PUBLIC_URLPublic base URL of the ByteChef UI, used for OAuth2 redirect URIs and mail linkshttp://127.0.0.1:8080
BYTECHEF_WEBHOOK_URLURL template of the webhook URLs that ByteChef registers with trigger providers and shows in the workflow builderBYTECHEF_PUBLIC_URL/webhooks/{id}

Set them, and the baseUrl you pass to the SDK, to a domain you control (for example https://automations.example.com) to keep ByteChef host names out of the URLs your customers see. The values apply to the whole deployment; they cannot be set per connected user. See Environment Variables.

How is this guide?

Last updated on

On this page