- Behaviour: language, how the panel opens, search, hand-off, consent, analytics and bot protection.
- Theming: brand colour, palette, fonts, dark mode and view modes, applied to the whole widget. Most sites need nothing more.
- Component styles: one CSS property on one part of the widget, such as
data-modal-header-background-color. A component style always wins over theming. The same page lists each component’s labels and switches. - Legacy and kapa.ai names: the other attribute names the widget also reads.
Where to set an option
For each option, the first of these that sets it wins:- An attribute on the script tag, such as
data-view-mode="sidebar". - A widget integration, named on the tag with
data-widget-id. Edit it in the dashboard under Integrations → Website widget. Its settings apply to every page that carries the tag, so you can change the widget without editing your site. - The widget’s default.
data-base-url, the signed-in reader (data-user-id, data-user-email) and component styles. The most-used ones are on its first tabs; the rest are under More options, each shown with its attribute name.
KeluWidget.init() instead of using attributes. It needs clientKey and either knowledgeBaseId or widgetId. The other option names are camelCase but often differ from the attribute: data-launcher-button-hidden is hideLauncher, data-modal-overlay-hidden is hideOverlay, data-chat-disclaimer is disclaimer. See Functions.
How attribute values are read
- Booleans: any value except
"false"or"0"is true. A baredata-search-mode-enabledturns search on. - Defaults: leaving an attribute out keeps the default, and so does setting a text attribute to
"". The one exception isdata-modal-subtitle="", which removes the subtitle. - Lists are comma-separated.
data-suggested-questionsis split on|, so a question can contain a comma.data-privacy-linksis JSON. - Sizes take any CSS length. A bare number means pixels for widths, heights and component styles. Font sizes,
data-border-radiusand the panel offsets need a unit, such as15px. - Unsafe values are ignored: anything containing
;,{,},<,>orurl(, or longer than 200 characters.