UI kit
The Baseera UI kit: the chat surface, approval cards, tool status lines and static previews, in three entry points.
@baseera/ui is the ready-made interface. It follows the design rules of the product: Arabic first, right to left with no extra CSS, readable in light and dark, and keyboard and screen reader friendly.
It imports nothing from your app, makes no network calls, and holds no keys. The components that talk to Baseera get their data from @baseera/react, and live in a separate entry so the plain ones stay free of it.
Three entry points
| Import | Contents | Needs the provider |
|---|---|---|
@baseera/ui | Props-only components: Baseera, ApprovalCard, ToolStatus, ChatTranscript, FieldDraft, KnowledgeUpload, AssistantMark, label and locale helpers. | No |
@baseera/ui/connected | BaseeraSurface, BaseeraApprovals, BaseeraToolActivity, BaseeraField, BaseeraKnowledgeUpload. | Yes |
@baseera/ui/static | BaseeraStaticChat, BaseeraStaticField, BaseeraStaticNotice, BaseeraStaticReview. For previews and docs. | No |
Import the stylesheet once:
import "@baseera/ui/baseera.css";Every built file is a client component. The peer dependencies are react, react-dom, lucide-react and @baseera/core. @baseera/react is an optional peer, needed only for @baseera/ui/connected.
The default chat
import "@baseera/ui/baseera.css";
import { BaseeraSurface } from "@baseera/ui/connected";
<BaseeraSurface locale="ar" />Inside BaseeraProvider, this gives you a launcher, a panel with the conversation, sources, tool status, approval cards and a typing row. See Surface and chat.
A preview with no session
import { getSurfaceLabels } from "@baseera/ui";
import { BaseeraStaticChat } from "@baseera/ui/static";
<BaseeraStaticChat
dir="rtl"
labels={getSurfaceLabels("ar", { name: "نور" })}
messages={[{ id: "1", role: "user", text: "أين طلبي؟" }]}
/>See Static chat.
Behavior you can rely on
BaseeraSurfacestays in the corner you choose withplacement. On a phone the open panel takes the whole screen, traps focus, and returns focus to the launcher when it closes. The lower-levelBaseerashell can also be dragged by its header on wide screens, snaps to a corner, and remembers its place in this browser.- Esc is handled on the window and only consumed when the kit uses it.
- Under
prefers-reduced-motionthere is no geometry transition, only a 150 ms fade. - Names and ids inside Arabic text render with bidi isolation.
Bundle size
Minified and gzipped, without peer dependencies: @baseera/ui is about 21.3 kB, @baseera/ui/connected about 24.7 kB and @baseera/ui/static about 4.9 kB. The static entry is separate so the main bundle does not grow.