toast-notifications
Installation
SKILL.md
Toast Notifications
A cookie-based toast system that lets a Server Action send a one-shot message to the
client, surviving a redirect(). The server writes a short-lived cookie; the next page
render reads it, fires the toast, and clears the cookie so it shows exactly once.
It is library-agnostic and dependency-free (no js-cookie — it reads
document.cookie directly). You plug in whatever toast UI you already use.
Reference files (read as needed):
- architecture.md — how it works, cookie config, security, debugging
- patterns.md — when/how to use it + complete examples (redirect vs. client-handled, validation, bulk, upload) and the do/don't list
Copy-into-project source lives under
assets/lib/toast/.
A redirect response can't carry data back to the component, but a cookie survives the navigation and auto-expires. See architecture.md for the full rationale, cookie config, and security notes.