How configuration works
The Concierge has two configuration sources:- HTML attributes you set on the tag — everything listed on this page.
- Runtime configuration from the Bonsai dashboard — brand colors, fetched per-tenant at load time using your
api-keyand applied automatically as CSS custom properties.
Precedence
For any given value, the component resolves in this order:- Inline CSS custom property set on the tag’s
styleattribute - Dashboard configuration for this
api-key - Built-in default
Components
<bonsai-chat> opens on load — it does not render in place. It is not an inline chat you can position in your layout; it is the same overlay panel, opened automatically. Use it only where you want the conversation to start unprompted. For a launcher the shopper chooses to press, use <bonsai-chat-bubble>.<bonsai-question-marquee> additionally requires external-id (or sku) and renders nothing if the product has no generated questions.Required attributes
required
Your Bonsai API key. Required on every component. Used to fetch runtime configuration and to authenticate the conversation.
Connection
Only set this if you are pointing an embed at a non-production environment. In normal installations, leave it off — the component infers it from the script tag it was loaded from.
Launcher appearance
These apply to<bonsai-chat-bubble> only.
An unrecognized value falls back to the default rather than erroring.
launcher-variant="rounded" renders a pill; launcher-icon="star" renders the sparkles glyph. Values are matched case-insensitively and trimmed, so " TAB " resolves to tab.On phones 380px and narrower the launcher shrinks to a compact tab and shows this text instead of Keep it to roughly 10 characters — the compact tab is narrow, and longer text is truncated with an ellipsis rather than wrapped. See Responsive behavior.
label. If you do not set it:labelis reused when it is 10 characters or shorter- Otherwise it falls back to
"Ask AI"
label="Ask" needs nothing, and label="Ask us anything" renders Ask AI on a small phone unless you supply something better.When
launcher-content is text or text-icon, this is only honored if it contains both the visible label and the compact label — otherwise the rendered text is used as the accessible name instead, so that a shopper using voice control can always say what they see.Launcher position
Each of these sets the corresponding CSS custom property, so anything valid in CSS works —
82px, 4rem, calc(20px + env(safe-area-inset-bottom)).
These do not apply on phones 380px and narrower. At that width every launcher becomes a compact tab pinned to the side of the viewport and centered vertically, so
bubble-bottom, bubble-right, bubble-left, and bubble-top are all ignored. To move it there, set --bonsai-agent-bubble-compact-top — see Responsive behavior.Panel content
These apply to<bonsai-chat-bubble> and <bonsai-chat>.
Behavior
The timer resets on any pointer move, pointer press, key press, scroll, or touch, and pauses while the tab is hidden — so a shopper who leaves a tab open in the background does not return to an opened panel. It fires at most once, and never while the panel is already open.
Set this on product pages so the conversation knows which product the shopper is looking at.
Sales call-to-action
An optional promotional row rendered inside the panel after a set number of exchanges.Boolean attributes
Every attribute marked Boolean above is presence-based, following the HTML convention. The attribute being present enables it, whatever its value:handoff="false" enables handoff. This trips people up — if you are toggling one of these from a template, omit the attribute rather than setting it to a falsy string.