@daltonr/notifywrite
v0.3.0
Published
Headless notification engine. Zero dependencies.
Downloads
386
Maintainers
Readme
@daltonr/notifywrite
Headless, framework-agnostic notification engine. Zero dependencies, zero UI opinions — NotificationEngine manages a queue of notifications (add, update, dismiss, clear, auto-dismiss with pause/resume, ordering, max-size overflow, dismiss reasons) and framework adapters expose it through each framework's own reactivity.
npm install @daltonr/notifywriteimport { NotificationEngine } from "@daltonr/notifywrite";
const engine = new NotificationEngine({ order: "newest-first", max: 5 });
engine.subscribe(() => render(engine.snapshot().notifications));
const id = engine.add("Uploading…", { type: "info" });
engine.update(id, { message: "Uploaded", type: "success", duration: 4000 });
engine.pause(id); // freeze the auto-dismiss timer (pause-on-hover)
engine.resume(id); // continue with the remaining timeThe @daltonr/notifywrite/remote subpath bridges server-sent notifications into the engine over SSE, WebSocket, or polling — see the project README.
Adapters: React · Vue · Svelte · Solid · Angular · React Native
MIT © Richard Dalton
