Static chat
BaseeraStaticChat draws the open chat panel from props alone, for previews, settings pages and docs.
BaseeraStaticChat renders the open chat panel in the page flow. It shows the header (the assistant's mark, its name and a status light), the real conversation bubbles, and a typing row that is disabled. It starts no session, makes no network call, and needs no BaseeraProvider.
Use it where you want to show what the assistant looks like without a live agent: a settings page that previews a theme, a docs page, a screenshot, a marketing section. The Baseera console's assistant settings preview uses it, so a preview shows exactly the bubbles an end user gets.
import "@baseera/ui/baseera.css";
import { getSurfaceLabels } from "@baseera/ui";
import { BaseeraStaticChat } from "@baseera/ui/static";
export function Preview() {
return (
<BaseeraStaticChat
dir="rtl"
labels={getSurfaceLabels("ar", { name: "نور" })}
messages={[
{ id: "1", role: "user", text: "أين طلبي؟" },
{ id: "2", role: "assistant", text: "طلبك في الطريق ويصل غدًا. [S1]", sources: [{ ref: "S1", title: "سياسة الشحن" }] },
]}
theme={{ accent: "#3a86a4" }}
maxHeight="340px"
/>
);
}It is its own entry point (@baseera/ui/static, about 4.9 kB gzipped), so the main bundle does not grow.
Props
Prop
Type
A message is { id, role: "user" | "assistant", text, extras?, sources?, rating? }. Messages with sources show source chips, and the [S1] markers in the text line up with them.
Arabic digits
The transcript uses Western digits unless you pass formatNumber. For Arabic digits, use numberFormat:
import { getSurfaceLabels, numberFormat } from "@baseera/ui";
<BaseeraStaticChat
dir="rtl"
labels={getSurfaceLabels("ar")}
messages={messages}
formatNumber={numberFormat("ar", "arab")}
/>It is isolated from your page
The panel pins its palette to its own theme with data-baseera-scheme, so a .dark class on your page, such as a console theme switch, does not repaint it. To preview a dark panel, pass theme="dark" or theme={{ mode: "dark" }}.
<BaseeraStaticChat dir="ltr" labels={getSurfaceLabels("en")} messages={messages} theme="dark" />What is not interactive
The typing row is disabled and the send button does nothing. Nothing typed goes anywhere. Use it for looking, not for chatting. For a live chat, use BaseeraSurface.
Other static pieces
The same entry point also exports BaseeraStaticField, BaseeraStaticNotice and BaseeraStaticReview, which draw the immersive-mode field ring, the notice pill and the review panel. See Components.