
Notifications · €7
Toast
Every toast is the Bot: a drop of ink that unrolls into a pill. Olive when saved, Wine when it fails, turning while a promise runs.
Pay once on Gumroad: the download, plus a licence key for the registry and the MCP server.
Details
- Category
- Notifications
- Plan
- Paid, €7 once
- Code
- React + Tailwind, TypeScript · 300 lines
- Files
- Toast.tsx
- Needs
- The Bot (installed with it)
- Agents
- MCP server and shadcn registry
About
Every toast is the Bot. It drops in as a drop of ink, lands with a squash and unrolls into a pill with your message. Saved: it turns Olive and smiles. Failed: Wine, its eyelids droop and the pill shakes once. Loading: it turns round until your promise is done, then becomes the answer.
Older toasts roll back into small drops beside the newest. Hover them and they open into a list, and the timers wait while you read. Leaving, the pill rolls back into the drop and it falls away.
React + Tailwind and the Bot, no other libraries. Works with screen readers and 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/toastOr 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 Toast component to this project. Use the StackD MCP server: call get_component with { "name": "toast" }, 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
Toast.tsxandBot.tsxinto the same folder (for examplecomponents/). - Put the Toaster in your app once, then send toasts from anywhere:
import { Toaster, toast } from './components/Toast'
<Toaster />
toast('Link copied')
toast.success('Saved')
toast.error("Couldn't save", { description: 'Check your connection' })
toast('Moved to bin', { action: { label: 'Undo', onClick: restore } })
toast.promise(save(), { loading: 'Saving', success: 'Saved', error: "Couldn't save" })
toast.dismiss() // all of them, or toast.dismiss(id)
toast() returns an id. A toast stays 4 seconds (6 with an action); loading ones stay until the promise settles.
This Bot.tsx has a turn prop that older copies of the Bot don't have. If you already use the Bot from StackD, replace it with this one; everything else stays the same.
In Next.js the files already start with 'use client'. In other React setups that line does nothing.
Options
toast(title, options):
| Option | What it does |
|---|---|
description | A second, quieter line |
action | { label, onClick }: a button in the pill, like Undo |
duration | How long it stays, in ms |
toaster | Which <Toaster id> shows it, if you have more than one |
<Toaster />:
| Prop | Default | What it does |
|---|---|---|
position | 'bottom' | 'bottom' or 'top', centred |
theme | 'light' | 'light' (white pills, ink Bot) or 'dark' |
max | 4 | How many stay on screen; older ones leave |
id | Shows only the toasts sent with this toaster name | |
contained | false | Inside the nearest positioned parent instead of the window |
Accessibility
Toasts are announced politely; errors are announced at once. With reduced motion on, they fade in and out without dropping, shaking or turning.
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

