The live bot as set in Customize, with the form and colorway above.
Colours and theming
The bot reads the site's semantic tokens, so with tokens.css loaded it follows light, dark and system themes on its own. Override any of these on the element or an ancestor:
exa-bot {
--exabot-accent: var(--color-accent);
--exabot-focus: var(--color-focus);
--exabot-bubble-surface: var(--color-surface-raised);
--exabot-bubble-text: var(--color-text-primary);
--exabot-bubble-border: var(--color-border);
--exabot-bubble-shadow: var(--elevation-md);
--exabot-font: var(--font-family-base);
--exabot-heart: #ec4899;
}
Calling it from the page
const bot = document.querySelector('exa-bot');
bot.say('Welcome back');
bot.celebrate(); // e.g. after a form submits
bot.confused('Page not found');
bot.state = 'working'; // agent states: idle | working | done
// also: poke(), hop(), dizzy(), peek(true|false),
// stretch(), sleep(), wake(), nudge()
bot.addEventListener('exabot-poke', e => console.log(e.detail.line));
// also: exabot-dizzy, -celebrate, -confused, -peek,
// -fling, -pet, -state {state, from}