Components reference
Every component @baseera/ui exports, with its props and a description of what it renders.
Each entry says which entry point it comes from, lists its props, and describes what you see.
Connected components
Import from @baseera/ui/connected. They must render inside BaseeraProvider.
BaseeraSurface
The default chat. A launcher pill in a corner of the page, showing the assistant's mark and a label. Selecting it expands into a panel: a header with the assistant's name and a status light, the conversation in the middle (your messages and the assistant's as bubbles, with source chips under replies, tool status lines, and approval cards), and a typing row at the bottom with a send button that becomes a stop button while a reply streams. On a phone it fills the screen.
Props are in Surface and chat. It also exports friendlyError(code, labels), the end-user text for an error code.
BaseeraApprovals
A stack of approval cards for the draft and write calls of the latest assistant message, in call order, each marked "1 of 3".
Prop
Type
BaseeraToolActivity
A quiet line for each read-tool call of a message: a small progress mark and "Checking invoices" while it runs, then a check mark when done, or a warning icon, a ban icon or a clock when it failed, was rejected or timed out.
Prop
Type
BaseeraField
Wraps one of your inputs so Baseera can point at it, flag it, and propose a value. The input is rendered unchanged inside a relatively positioned wrapper. While an open check names the field, a ring in the severity color and a badge with the check's message appear. A proposed value appears under the field as a draft with Approve and Reject.
Prop
Type
BaseeraKnowledgeUpload
A tenant's document manager: a drop zone, a list of the tenant's documents with their status (ready, or failed with a reason), and a delete action with a confirmation. When the agent has tenant uploads off it shows one line and no drop zone.
Prop
Type
Plain components
Import from @baseera/ui. They take props and labels and know nothing of the SDK.
ApprovalCard
A card for one action that needs a person's approval. A small tag says whether it is a draft or a change, the description says what will happen in one sentence, and a list of label and value pairs shows the key values. Two buttons, Approve and Reject, sit at the bottom. Reject opens an optional reason field. After a decision the buttons are replaced by a status line, Running, Done, Rejected or Failed, and a Done card shows Undo when you pass onUndo.
Prop
Type
ApprovalValue is { label: string; value: string }. MAX_REASON (500) is exported.
ToolStatus
One line about a tool call. A running call shows a small progress mark and the running text. A finished call shows a check mark, a warning icon for a failure, a ban icon for a rejection, or a clock for a timeout. A failure can show its error under the line, and is announced to screen readers when it appears.
Prop
Type
ChatTranscript
The conversation: user and assistant bubbles, a typing indicator, source chips and an error line. It stays scrolled to the newest content unless the person scrolled up. Screen readers hear a finished reply once, not every streamed word.
Prop
Type
A TranscriptMessage is { id, role: "user" | "assistant", text, extras?, sources?, rating? }. extras is shown under the message, for tool activity and approval cards.
FieldDraft
A proposed value under a field: a draft tag, the value, the reason, and Approve and Reject. Reject opens an optional reason. It is a suggestion; nothing is written until Approve.
Prop
Type
KnowledgeUpload
The plain version of BaseeraKnowledgeUpload. It takes the state and callbacks as props: sources, uploads, loading, error, disabled, onFiles, onRemove, tenantName, accept, locale, digits, dir, labels and className.
AssistantMark
The assistant's mark: a speech bubble on a rounded tile, or the owner's logo when one is set. Its mood tints the tile's edge: calm, concern, alert, think or happy. Three dots move while it is working. Props: mood and size (default 26).
Baseera
The shell behind the surface: one floating element with three modes, home (the launcher with a badge), notice (a small card Baseera speaks up with) and open (a header, a body and the input). Most apps use BaseeraSurface. Use Baseera when you drive it yourself with items and commands.
Prop
Type
The component has more props, such as autoOpen, panelSlot, finishSlot, badge, reservedKeys and inlineLauncher. Your editor lists them with their types and comments. An action has type local, write or draft; an action without a valid type is not rendered.
Static components
Import from @baseera/ui/static. They draw a piece of the interface from props alone, with no session and no network, for previews and docs. Every control in them is a sample: a click or Enter on it stops before its own handler.
| Component | What it renders | Main props |
|---|---|---|
BaseeraStaticChat | The open chat panel: header, conversation, disabled typing row. See Static chat. | messages, labels, dir, theme, logo, maxHeight, formatNumber |
BaseeraStaticField | Your input with the SDK's flag or draft ring and a slot under it. | severity, draft, radius, below, children |
BaseeraStaticNotice | The notice pill: the mark, the issue and one action. | title, sub, action, mood |
BaseeraStaticReview | The open review panel: header, count pills, review tiles and a disabled finish bar. | labels, title, items, counts, finish |
All of them also take dir, theme, logo and mark ("bubble" or "orb", a flat round disc).
Helpers
| Export | Purpose |
|---|---|
getSurfaceLabels, getApprovalLabels, getToolStatusLabels, getFieldLabels, getKnowledgeUploadLabels, getReviewLabels, getBaseeraLabels | Label sets for a locale, with overrides. |
resolveTheme(theme, prefersDark?, agentTheme?) | Turns a theme input into CSS variables and a dark flag. |
isolate(value) | Wraps a value in bidi isolation marks. |
numberFormat, formatDate, plural | Locale-aware formatting. |
openBaseeraCommands() | Opens the command list. |
baseeraDockRef, baseeraMainRef, markBaseeraDock | Refs for elements marked data-baseera-dock and data-baseera-main. |
canUndo(action), isValidAction(action) | Action helpers. |