
Inputs · €7
Bot feedback
A rating prompt where the Bot reacts to the score.
Pay once on Gumroad: the download, plus a licence key for the registry and the MCP server.
Details
- Category
- Inputs
- Plan
- Paid, €7 once
- Code
- React + Tailwind, TypeScript · 241 lines
- Files
- BotFeedback.tsx
- Needs
- The Bot (installed with it)
- Agents
- MCP server and shadcn registry
About
A rating card with the Bot (StackD Kit 01) on top. Move along the 1–5 scale and the Bot's face changes with you: droopy lids on a 1, neutral on a 3, smiling eyes on a 4, happy and hopping on a 5. The scale fills from left to right in a colour that goes from Wine to Olive. Pick a number and a comment box opens with a question that fits; send it and the Bot thanks you. Mouse, touch and keyboard, and it works with screen readers. White and black versions. React + Tailwind, no other libraries. Respects reduced motion.
Install
Once: add the StackD registry to components.json, with the licence key from your receipt in STACKD_LICENSE_KEY (in .env.local):
"registries": {
"@stackd": {
"url": "https://www.stackd.codes/r/{name}.json",
"headers": { "X-License-Key": "${STACKD_LICENSE_KEY}" }
}
}With the shadcn CLI:
npx shadcn@latest add @stackd/bot-feedbackOr 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 feedback component to this project. Use the StackD MCP server: call get_component with { "name": "bot-feedback" }, 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. It is a paid component: if the server says it needs a licence, tell me where to buy it.Use
- Copy
BotFeedback.tsxandBot.tsxinto the same folder of your project (for examplecomponents/).
If you already have the Bot from Kit 01, replace it with this one: it adds the mood prop.
- Use it:
import { BotFeedback } from './components/BotFeedback'
<BotFeedback
onSubmit={async (rating, comment) => {
await fetch('/api/feedback', { method: 'POST', body: JSON.stringify({ rating, comment }) })
}}
/>
Black card, your own words:
<BotFeedback
theme="dark"
title="How was your call?"
labels={['Awful', 'Poor', 'Fine', 'Great', 'Perfect']}
/>
For small spaces (a toast, a sidebar), compact drops the comment box: the number is the answer.
<BotFeedback compact onSubmit={(rating) => track('nps', rating)} />
In Next.js the files already start with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
onSubmit | waits 0.9 s | (rating, comment) => void | Promise<void>. The card shows a spinner until it resolves |
theme | 'light' | 'light' (white card) or 'dark' (black card) |
bot | pill, tall eyes | { shape, eyes } for the Bot, from Kit 01 |
title | 'How was it?' | The question |
labels | Bad … Love it | The five words shown for 1 to 5 |
color | Wine → Olive | One colour for the whole scale instead |
compact | false | Smaller Bot, no comment box; picking a number sends it |
defaultRating | Start with a number already picked, 1 to 5 |
The Bot's moods
The Bot now has a mood prop, from -1 (sad: the top lids droop to the outside) to 1 (glad: the lower lids push up and the eyes smile). It moves between moods smoothly. You can use it anywhere:
<Bot mood={-0.5} />Keyboard
Left / Right (or Down / Up): previous / next number. 1–5: jump to that number.
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.
Made by StackD · stackd.codes




