
AI · Free
Bot chat
A chat where the Bot listens: it watches you type, looks up while it thinks, its mouth moves as the answer streams in and its face takes the mood. Plug in any AI with onSend.
Free on Gumroad: the download arrives in your inbox.
Details
- Category
- AI
- Plan
- Free
- Code
- React + Tailwind, TypeScript · 269 lines
- Files
- BotChat.tsx
- Needs
- The Bot (installed with it)
- Agents
- MCP server and shadcn registry
About
A small chat where the Bot is the one you talk to, and you can see it listen. While you type it watches the field, following your words along. Send, and it looks up while it thinks (three dots bounce like jelly), then its mouth moves as the answer comes in word by word, and its face takes the answer's mood: glad, sorry or somewhere in between.
Minimal by design: the Bot's answers are plain text, yours sit in a soft bubble with the time under the last one, a live dot shows how it's doing (Listening…, Thinking…, Answering…), suggestions to start with, the send button inside the field. Bubbles spring in from their corner.
Plug in your own answers: an LLM, a FAQ, a support API, anything. React + Tailwind, needs the Bot (included).
Install
With the shadcn CLI:
npx shadcn@latest add https://www.stackd.codes/r/bot-chat.jsonOr let your agent add it through the StackD MCP server:
claude mcp add --transport http stackd https://www.stackd.codes/mcpPrompt for your agent
Paste it into Claude Code, Cursor, Codex or VS Code once the MCP server is connected.
Add the StackD Bot chat component to this project. Use the StackD MCP server: call get_component with { "name": "bot-chat" }, write the files at the paths it gives and install any npm packages it lists. Then use it where it fits, following its README for the props, and keep its own styles.Use
- Copy
BotChat.tsxandBot.tsxinto the same folder of your project (for examplecomponents/). - Use it:
import { BotChat } from './components/BotChat'
<BotChat
name="Bot"
onSend={async (text, history) => {
const answer = await askYourAI(text, history) // your API
return { text: answer, mood: 0.6 } // or just the string; the mood is guessed if you leave it out
}}
/>
onSend gets the message and the chat so far, and returns a string, { text, mood }, or a Promise of either. mood goes from -1 (sorry) to 1 (glad). Without onSend it answers with a few demo replies.
In Next.js the files already start with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
onSend | demo replies | Your answers: (text, history) => reply |
name | 'Bot' | The Bot's name, in the header |
status | 'Here to help' | The line under the name while it waits |
greeting | "Hi, I'm the Bot…" | Its first message |
initial | [] | A conversation to start from: { from: 'you' | 'bot', text }[] |
draft | '' | Text already in the field |
suggestions | three questions | Chips to start with; they go once you've written |
placeholder | 'Write a message' | The field's placeholder |
shape | 'hexagon' | The Bot's shape: hexagon, circle, squircle, pill, arch, drop, triangle, cloud, clover |
eyes | 'round' | round, tall, square or wide |
theme | 'light' | 'light' or 'dark' |
width / height | 380 / 560 | Size in px |
className | Extra classes |
Accessibility
The messages are a live log, so screen readers hear new answers. The field and the send button are labelled; Enter sends. With reduced motion on, answers appear at once and nothing springs.
Colours from StackD
White #FFFFFF · Ink #141310 · Wine #901919 · Olive #6C8544 · Ochre #BE9344 · Lilac #C9B8FF
Licence
You can use it in personal and commercial projects. Don't resell or share the component on its own.

