Zelto
Agent Chat SDK

Theming

Customize the appearance of the chat widget to match your brand.

The Agent Chat SDK supports theming through the theme option in init(). You can customize the primary color and border radius.

Primary color

Set primaryColor to any hex color value. The SDK automatically generates hover, active, light background, and text contrast variants.

init({
  apiKey: 'your-api-key',
  userId: 'user-123',
  theme: {
    primaryColor: '#7c3aed', // Purple
  },
});

How colors are derived

CSS VariableDerivation
--zlt-primaryThe color you provide.
--zlt-primary-hoverLightness reduced by 6%.
--zlt-primary-activeLightness reduced by 12%.
--zlt-primary-lightSaturation 40%, lightness 96% (background).
--zlt-primary-text#1a1a1a or #ffffff based on luminance.

The default primary color is #2563eb (blue).

Border radius

Control the roundness of UI elements with the borderRadius option. You can use a preset or a custom pixel value.

init({
  apiKey: 'your-api-key',
  userId: 'user-123',
  theme: {
    borderRadius: 'pill', // or 'sharp', 'rounded', or a number
  },
});

Presets

PresetValue
'sharp'4px
'rounded'8px
'pill'16px

You can also pass a number (e.g. 12) for a custom radius in pixels.

Derived radius values

CSS VariableDerivation
--zlt-radiusThe base radius.
--zlt-radius-lg2x base, capped at 24px.
--zlt-radius-sm75% of base, minimum 4px.

On this page