Skip to content

Commit 39a00a9

Browse files
committed
docs(readme): npm install, ChatThread example, component index (CL-9078)
Drops the pin-a-commit guidance and the Thinking indicator showcase, which its Ladle story covers, and links repo docs by absolute GitHub URL so they resolve on npm.
1 parent 376d59f commit 39a00a9

1 file changed

Lines changed: 174 additions & 34 deletions

File tree

‎README.md‎

Lines changed: 174 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ Optional peers, needed only by the subpaths that import them. These modules are
1919

2020
```bash
2121
npm add @corbits/react-ui
22-
pnpm add @corbits/react-ui
23-
yarn add @corbits/react-ui
24-
bun add @corbits/react-ui
25-
```
26-
27-
Until a release is cut, consumers pin a commit instead of a version range:
28-
29-
```json
30-
"@corbits/react-ui": "github:corbitsdev/react-ui#<commit-sha>"
3122
```
3223

3324
Import the stylesheet once at the app root, before your own CSS (no Tailwind build required). Mount `ThemeProvider` near the root so dark mode persists per user, and `Toaster` once alongside it so any component can call `toast()`:
@@ -80,17 +71,188 @@ export function NotFoundPage() {
8071
}
8172
```
8273

74+
A conversation is a `ChatThread` over a `messages` array; each message is an ordered list of parts, so an agent turn can interleave text and tool calls:
75+
76+
```tsx
77+
import { ChatThread, type ChatMessage } from "@corbits/react-ui";
78+
79+
const messages: ChatMessage[] = [
80+
{
81+
id: "m1",
82+
role: "user",
83+
createdAt: "2026-01-01T09:00:00Z",
84+
parts: [{ type: "text", text: "What changed in the repo today?" }],
85+
},
86+
{
87+
id: "m2",
88+
role: "agent",
89+
createdAt: "2026-01-01T09:00:04Z",
90+
parts: [
91+
{
92+
type: "tool",
93+
toolCallId: "t1",
94+
toolName: "git__log",
95+
label: "Read today's commits",
96+
state: "done",
97+
output: "3 commits",
98+
},
99+
{ type: "text", text: "Three commits landed today, all in the docs." },
100+
],
101+
},
102+
];
103+
104+
export function Conversation() {
105+
return (
106+
<div style={{ display: "flex", flexDirection: "column", height: 384 }}>
107+
<ChatThread messages={messages} identity={{ name: "Scout" }} />
108+
</div>
109+
);
110+
}
111+
```
112+
83113
Every component is importable by subpath (`@corbits/react-ui/ui/button`); all but the optional-peer modules above are also exported from the root (`@corbits/react-ui`).
84114

85115
The brand faces (Red Hat Display, Space Mono) are named by the theme but not bundled. Load them yourself, or the stack falls through to system fonts; to use a face loaded under a generated name, override `--font-sans` / `--font-mono`.
86116

87117
This package ships no `"use client"` directives. In a React Server Components app, re-export stateful components from a file you mark yourself, using subpaths rather than the root barrel.
88118

119+
## Components
120+
121+
Subpaths are relative to `@corbits/react-ui/`.
122+
123+
### Chat
124+
125+
| Component | Subpath | What it is |
126+
| --- | --- | --- |
127+
| `ChatThread` | `ui/chat-thread` | Scrolling transcript of user and agent messages |
128+
| `AgentTurn` | `ui/agent-turn` | One agent reply: reasoning, tool calls, answer, in order |
129+
| `MessageBubble` | `ui/message-bubble` | One user or system message |
130+
| `ChatInput` | `ui/chat-input` | Auto-growing message input with a send/stop button |
131+
| `ChatComposer` | `ui/chat-composer` | `ChatInput` with suggestion chips for an empty conversation |
132+
| `ChatPanel` | `ui/chat-panel` | Docked chat frame with header and footer |
133+
| `PartsRenderer` | `ui/parts-renderer` | Renders a list of message parts |
134+
| `ReasoningBlock` | `ui/reasoning-block` | Collapsible thinking text |
135+
| `ToolBlock` | `ui/tool-block` | A tool call's lifecycle: running, done, failed |
136+
| `ToolNarrative` | `ui/tool-narrative` | What the agent did, as one expandable line |
137+
| `ToolPicker` | `ui/tool-picker` | Browse, search and select tools |
138+
| `QuickReplyChips` | `ui/quick-reply-chips` | Tappable suggested replies |
139+
| `TypingIndicator` | `ui/typing-indicator` | Agent-is-typing dots |
140+
| `ThinkingIndicator` | `ui/thinking-indicator` | Animated Corbits mark with a status label |
141+
| `ThinkingMark` | `ui/thinking-mark` | Decorative animated Corbits mark |
142+
| `ThinkingLabel` | `ui/thinking-label` | Rotating-verb status label |
143+
| `ShimmerText` | `ui/shimmer-text` | Shimmer sweep over text |
144+
| `MicButton` | `ui/mic-button` | Permission-aware microphone toggle |
145+
| `VoiceWaveform` | `ui/voice-waveform` | Live audio level bars |
146+
| `DictationStatusLine` | `ui/dictation-status-line` | Composer dictation status row |
147+
| `MicPermissionDialog` | `ui/mic-permission-dialog` | Microphone permission prompt |
148+
149+
### Runs
150+
151+
| Component | Subpath | What it is |
152+
| --- | --- | --- |
153+
| `LiveRunBanner` | `ui/live-run-banner` | Status of a run in progress |
154+
| `LiveStatusLine` | `ui/live-status-line` | The single "what's happening now" line |
155+
| `ApprovalCard` | `ui/approval-card` | Approve or reject a pending action |
156+
| `GateBlock` | `ui/gate-block` | Chrome for a run parked on a human decision |
157+
| `StepList` | `ui/step-list` | Vertical list of run steps and their status |
158+
| `HorizontalStepper` | `ui/horizontal-stepper` | Horizontal step progress |
159+
| `ProgressChecklist` | `ui/progress-checklist` | Steps of a long operation and how far along it is |
160+
| `TraceWaterfall` | `ui/trace-waterfall` | Run-trace timeline, one row per span |
161+
| `IntakeForm` | `ui/intake-form` | Inputs a workflow asks for before it runs |
162+
| `RunNowButton` | `ui/run-now-button` | Run something immediately |
163+
| `ConfirmButton` | `ui/confirm-button` | Button that asks for a second click |
164+
| `NowCards` | `ui/now-cards` | Attention band of items needing action |
165+
| `NotificationsBell` | `ui/notifications-bell` | Bell with count and a panel slot |
166+
167+
### Artifacts
168+
169+
| Component | Subpath | What it is |
170+
| --- | --- | --- |
171+
| `ArtifactBody` | `ui/artifact-body` | One artifact, drawn the way its kind implies |
172+
| `ArtifactNotice` | `ui/artifact-notice` | "Nothing to draw here" message for artifact viewers |
173+
| `BlockCard` | `ui/block-card` | Generative-UI block frame |
174+
| `ResearchBody` | `ui/research-body` | Research brief and report |
175+
| `CompareBody` | `ui/compare-body` | Side-by-side comparison |
176+
| `EmbedBody` | `ui/embed-body` | Sandboxed third-party embed |
177+
| `CsvTable` | `ui/csv-table` | Capped preview of CSV text |
178+
| `QuoteCard` | `ui/quote-card` | A rotating quote |
179+
| `ProfileCard` | `ui/profile-card` | Identity, status, actions and channels |
180+
181+
### Charts
182+
183+
| Component | Subpath | What it is |
184+
| --- | --- | --- |
185+
| `ChartFrame` | `ui/chart-frame` | Caption, legend, plot, and the same data as a table |
186+
| `TimeSeriesChart` | `ui/time-series-chart` | Values over time |
187+
| `BarChart` | `ui/bar-chart` | Vertical bars |
188+
| `CategoryBars` | `ui/category-bars` | Dense horizontal category ranking |
189+
| `Sparkline` | `ui/sparkline` | Inline trend line |
190+
| `TokenMosaic` | `ui/token-mosaic` | Shares of a whole as one stacked strip |
191+
| `StatGrid` | `ui/stat-grid` | Grid of headline numbers |
192+
| `AnimatedNumber` | `ui/animated-number` | Number that counts to its new value |
193+
194+
### Layout
195+
196+
| Component | Subpath | What it is |
197+
| --- | --- | --- |
198+
| `PageShell` | `ui/page-shell` | Page margins and scroll ownership |
199+
| `PagePanel` | `ui/page-panel` | Bordered page-content frame |
200+
| `TopBar` | `ui/top-bar` | Title, breadcrumbs and actions row |
201+
| `Sidebar` | `ui/sidebar` | Collapsible navigation sidebar |
202+
| `SidebarPanel` | `ui/sidebar-panel` | Sidebar with pins, body and footer |
203+
| `SidebarItemRow` | `ui/sidebar-item-row` | One sidebar row |
204+
| `ListDetail` | `ui/list-detail` | Index on the left, open item on the right |
205+
| `InspectorShell` | `ui/inspector-shell` | Side inspector rail |
206+
| `Section` | `ui/section` | Titled block of content |
207+
| `SettingsPanel` | `ui/settings-panel` | Settings frame with optional save |
208+
| `LibraryPageHeader` | `ui/library-page-header` | Title, count and controls for a library page |
209+
| `Card` | `ui/card` | Bordered content card |
210+
| `EmptyState` | `ui/empty-state` | Title, description, icon and action |
211+
| `RichEmptyState` | `ui/rich-empty-state` | Empty state with suggested next-step actions |
212+
| `BootScreen` | `ui/boot-screen` | Screen shown before the app loads |
213+
| `DitherCanvas` | `ui/dither-canvas` | Animated dithered background |
214+
| `CorbitsMark` | `ui/corbits-mark` | Corbits logo |
215+
| `AuthLayout` | `blocks/login/auth-layout` | Sign-in page layout |
216+
| `LoginForm` | `blocks/login/login-form` | Sign-in and sign-up form, with optional SSO |
217+
218+
### Controls
219+
220+
| Component | Subpath | What it is |
221+
| --- | --- | --- |
222+
| `Button` | `ui/button` | Button with variants and sizes |
223+
| `Input` | `ui/input` | Text input |
224+
| `Textarea` | `ui/textarea` | Multi-line input |
225+
| `Select` | `ui/select` | Native select |
226+
| `Checkbox` | `ui/checkbox` | Checkbox |
227+
| `SelectionCheckbox` | `ui/selection-checkbox` | Row-selection checkbox |
228+
| `Switch` | `ui/switch` | On/off toggle |
229+
| `FileInput` | `ui/file-input` | File picker |
230+
| `Tabs` | `ui/tabs` | Tab strip |
231+
| `ViewToggle` | `ui/view-toggle` | Grid or rows segmented control |
232+
| `FilterBar` | `ui/filter-bar` | Row of filters with an active-filter summary |
233+
| `FilterChip` | `ui/filter-chip` | One toggleable filter |
234+
| `KindCardGrid` | `ui/kind-card-grid` | Selectable card grid |
235+
| `BulkActionBar` | `ui/bulk-action-bar` | Actions for a multi-row selection |
236+
| `Table` | `ui/table` | Table primitives |
237+
| `SortableTable` | `ui/sortable-table` | Table with sortable columns |
238+
| `Badge` | `ui/badge` | Status label |
239+
| `StatusDot` | `ui/status-dot` | Colored status dot |
240+
| `Avatar` | `ui/avatar` | Initials or image avatar |
241+
| `ProviderMark` | `ui/provider-mark` | Which service an action goes through |
242+
| `Skeleton` | `ui/skeleton` | Loading placeholder |
243+
| `Dialog` | `ui/dialog` | Modal dialog |
244+
| `CommandPalette` | `ui/command-palette` | Global search overlay |
245+
| `Menu` | `ui/menu` | Dropdown menu |
246+
| `InfoTooltip` | `ui/tooltip` | Hover info tooltip |
247+
| `Toaster` | `ui/toast` | Toast host; call `toast()` anywhere |
248+
| `ThemeProvider` | `ui/theme-provider` | Persists light, dark or system mode and presets |
249+
| `ThemeToggle` | `ui/theme-toggle` | Light, dark or system switch |
250+
89251
## How it works
90252

91253
Components never fetch — data arrives as props. The root entry is re-exports only and the package is side-effect free aside from the CSS files, so either import style tree-shakes to what you used. Tokens and keyframes live in `theme.css`; `styles.css` is the prebuilt sheet for hosts that do not run Tailwind.
92254

93-
See [PRODUCT.md](./PRODUCT.md) for why this library exists, [ARCHITECTURE.md](./ARCHITECTURE.md) for the no-fetch rule and the theme layer, and [IMPLEMENTATION.md](./IMPLEMENTATION.md) for toolchain and peers.
255+
See [PRODUCT.md](https://github.com/corbitsdev/react-ui/blob/main/PRODUCT.md) for why this library exists, [ARCHITECTURE.md](https://github.com/corbitsdev/react-ui/blob/main/ARCHITECTURE.md) for the no-fetch rule and the theme layer, and [IMPLEMENTATION.md](https://github.com/corbitsdev/react-ui/blob/main/IMPLEMENTATION.md) for toolchain and peers.
94256

95257
## Development
96258

@@ -106,30 +268,8 @@ bun run test
106268
bun run stories # Ladle workbench
107269
```
108270

109-
A new component is not done until it has at least one story per meaningful state, checked in both themes. See [CONTRIBUTING.md](./CONTRIBUTING.md).
110-
111-
## Thinking indicator
112-
113-
The Corbits logo has three motion variants: `silk` (default), `strata`, and `echo`.
114-
115-
```tsx
116-
import { ThinkingIndicator, ThinkingMark } from "@corbits/react-ui";
117-
118-
export function Thinking() {
119-
return (
120-
<>
121-
<ThinkingIndicator variant="silk" />
122-
<ThinkingIndicator variant="strata" label="Reviewing files..." />
123-
<ThinkingMark variant="echo" className="w-8" />
124-
</>
125-
);
126-
}
127-
```
128-
129-
`ThinkingIndicator` supplies an accessible status label; `ThinkingMark` is decorative.
130-
Both accept `variant`, `paused`, `className`, and `style`. Reduced-motion users see a
131-
static highlight instead.
271+
A new component is not done until it has at least one story per meaningful state, checked in both themes. See [CONTRIBUTING.md](https://github.com/corbitsdev/react-ui/blob/main/CONTRIBUTING.md).
132272

133273
## License
134274

135-
LGPL-2.1-only. See [LICENSE](./LICENSE).
275+
LGPL-2.1-only. See [LICENSE](https://github.com/corbitsdev/react-ui/blob/main/LICENSE).

0 commit comments

Comments
 (0)