You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 39a00a9
Browse filesBrowse the repository at this point in the historyBrowse files
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.
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() {
80
71
}
81
72
```
82
73
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:
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`).
84
114
85
115
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`.
86
116
87
117
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.
88
118
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 |
|`ThemeProvider`|`ui/theme-provider`| Persists light, dark or system mode and presets |
249
+
|`ThemeToggle`|`ui/theme-toggle`| Light, dark or system switch |
250
+
89
251
## How it works
90
252
91
253
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.
92
254
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.
94
256
95
257
## Development
96
258
@@ -106,30 +268,8 @@ bun run test
106
268
bun run stories # Ladle workbench
107
269
```
108
270
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`.
`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).
132
272
133
273
## License
134
274
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