
Loaders · €7
Bot loader
A multi-step loader with the Bot thinking it through.
Pay once on Gumroad: the download, plus a licence key for the registry and the MCP server.
Details
- Category
- Loaders
- Plan
- Paid, €7 once
- Code
- React + Tailwind, TypeScript · 313 lines
- Files
- BotLoader.tsx
- Needs
- The Bot (installed with it)
- Agents
- MCP server and shadcn registry
About
A loader where the Bot (StackD Kit 01) does the work you're waiting for. Give it the steps of a long task and say what each one is: the Bot reads (its eyes scan a line in small jumps, then drop to the next), thinks (it looks up and drifts), works (it looks down and chews) or waits.
The current step's name shimmers, a segmented bar fills step by step (exactly, if you pass progress; otherwise a sheen moves through the current step), a list ticks the steps off and a clock counts the seconds. Done: happy eyes and a hop, the bar turns green. Error: the Bot frowns, the step turns red, and Retry.
Two versions: a card, and an inline pill for buttons, toasts and chat rows. White and black. Works with screen readers (it announces each step). 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-loaderOr 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 loader component to this project. Use the StackD MCP server: call get_component with { "name": "bot-loader" }, 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
BotLoader.tsxandBot.tsxinto the same folder of your project (for examplecomponents/).
If you already have the Bot from an earlier StackD component, replace it with this one.
- Describe the steps, and tell it where your task is:
import { BotLoader, type LoaderStep } from './components/BotLoader'
const steps: LoaderStep[] = [
{ label: 'Reading your file', activity: 'read' },
{ label: 'Thinking it through', activity: 'think' },
{ label: 'Writing the summary', activity: 'work' },
]
const [step, setStep] = useState(0)
const [status, setStatus] = useState<'loading' | 'done' | 'error'>('loading')
async function run() {
setStatus('loading')
try {
setStep(0); const text = await readFile(file)
setStep(1); const plan = await think(text)
setStep(2); await write(plan)
setStatus('done')
} catch {
setStatus('error')
}
}
<BotLoader steps={steps} current={step} status={status} onRetry={run} error="Couldn't write the summary" />
If you know how far the current step is (an upload, a stream with a known length), pass it and the bar fills exactly:
<BotLoader steps={steps} current={step} progress={0.42} />
The small version, inline:
<BotLoader variant="inline" steps={steps} current={step} status={status} doneLabel="Summary ready" />
In Next.js the files already start with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
steps | { label, activity? }[]. activity: 'read', 'think', 'work' or 'wait' (default) | |
current | The step running now, 0-based. Steps before it show as done | |
status | 'loading' | 'done' when everything finished, 'error' when the current step failed |
progress | 0–1 within the current step. Leave it out for a moving sheen | |
error | 'Something went wrong' | Shown instead of the step's name on error |
onRetry | Shows a Retry button on error | |
doneLabel | 'Done' | What it says when done |
variant | 'card' | 'card' or 'inline' (a pill) |
showSteps | true | The list of steps under the bar (card only) |
theme | 'light' | 'light' (white) or 'dark' (black) |
bot | pill, tall eyes | { shape, eyes } for the Bot, from Kit 01 |
The clock starts when current goes back to 0 while loading, so a new run starts at 0s.
The Bot's mouth
The Bot has a mouth prop, from 0 (closed, not drawn) to 1 (wide open). The loader uses it when the Bot works. You can use it anywhere: <Bot mouth={0.6} />.
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
