Toast
@sushindustries/uiStrings, four seconds, bottom corner, announced politely - one provider and one hook, nothing else.
A minimal toast system: call useToast().toast(message) from anywhere under
ToastProvider and a string appears bottom-right for four seconds, announced
via role="status". Reach for it for a plain confirmation or error message -
not for anything with an action button, a promise, or a reason to stay on
screen longer.
tanstacktanstack add https://adamjurek.com/r/tanstack/toast.jsonpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/toast.jsonWhy it is built this way
Toasts are kept deliberately small: strings, four seconds, one bottom corner.
The region is role="status" so an arrival gets announced politely instead of
interrupting whatever's being read. The whole system is one provider and one
hook on purpose - actions, promises and progress bars belong to the page that
owns that state, not to a passing notification.
Install commands are not written here
Anything in packages/ui/registry.ts gets its TanStack and shadcn commands
attached automatically, so there is nothing to keep in sync.
Install
tanstack add https://adamjurek.com/r/tanstack/toast.jsonpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/toast.jsonpnpm add @sushindustries/ui @sushindustries/atomsWhat you get
| Version | 0.1.0 |
| Category | content · Feedback |
| Files | toast.tsx |
| Dependencies | None |
| Tags | notification, no-deps |
No runtime dependencies
It brings nothing with it beyond the stylesheet.