I have a workflow of an AI agent which is triggered by a chat trigger and i want to customize the webchat widget to fit my website’s theme… but i dont really understand how to do it.
Hey @The_Cloud , if you want to embed the chat widget into your website you have two options depending on your deployment preferences/process:
CDN embed
import embed
In either case, you can override default CSS properties. To override, you can take advantage of CSS overriding rules which state that if there are two identical CSS statements the last one take precedence.
In other words you need to add your own CSS file after the default one.
In practical terms it means
CDN embed:
<link href="https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css" rel="stylesheet" />
<link TO YOUR OWN CSS FILE>
Import Embed:
import '@n8n/chat/style.css';
import 'YOUR OWN CSS FILE';
import { createChat } from '@n8n/chat';
THANK YOU SO MUCH MAN!!! I wasn’t able to figure this out and it became one of my main worries but i really appreciate your help … never knew it was this easy. Have a great week!