API reference
Cockpit client (shared) API
Shared components and helpers of the Cockpit UI.
19 modules, 36 documented exports. Version next. All packages.
ui/client/components
ui/client/components/ui
- AnimatedLoaderExports: AnimatedLoader
- AnimatedLogoExports: AnimatedLogo
- BadgeReusable status badge — generalizes the tool/llm attribution label styling (previously hand-rolled per <span> in AttributionBadge and again, verbatim, in Help.jsx's prose) into one themed component. Exports: Badge
- ButtonReusable, themed button. Exports: Button
- DialogAccessible modal dialog, wrapping Radix Primitives' Dialog. Exports: DialogClose, DialogDescription, DialogTitle, DialogTrigger, Dialog, DialogContent
- FieldReusable labeled-field wrapper — the `<label className="field"> <span>Label</span>{input}<span className="field-hint">…</span></label>` pattern that used to be hand-repeated on every form field across Dashboard/Settings. Exports: Field
- GlassPanelReusable glass surface — the JSX side of 's .glass-panel CSS class. Exports: GlassPanel
- InputReusable, themed text/checkbox input. Exports: Input
- LogoThe brand marks (docs/brand/): pills and at most one lit element. Exports: Logo
- MenuAccessible dropdown menu, wrapping Radix Primitives' DropdownMenu. Exports: MenuTrigger, Menu, MenuContent, MenuItem
- SelectReusable, themed <select>. Exports: Select
ui/client/lib
- apiBaseShared, non-feature helper — every feature's service/ layer imports this instead of hand-rolling its own base-URL logic (avoids DRY-001 near- duplicates across dashboard/settings/wizard/help/pages-editor's services). Exports: API_BASE, WS_BASE
- httpExports: getJson, postJson, sendJson
- scrollSelectionIntoViewfollow-up to (pages-editor's TreePanel.tsx/PreviewPanel.tsx) — a plain DOM utility, not a hook or component: no state of its own, just a procedure a component's own `useEffect` calls. Exports: scrollSelectionIntoView
- useDismissableExports: useDismissable
- workActivity"Work is going on": the one signal behind the Cockpit's processing indicator (the top-bar brand mark animates only while this is true, and is still otherwise). Exports: beginWork, getWorkCount, isWorkRequest, subscribeWork, trackWork
- xstateInspectorEpic / — opt-in, dev-only XState inspector wiring. Exports: InspectorConfig, resolveInspectorConfig, startXStateInspector