๐Ÿš€ NotifyX v4

August 27, 2026 ยท View on GitHub

๐Ÿš€ NotifyX v4

The professional-grade notification library built for the AI era.

Visually stunning for designers, robust enough for complex architectures, and optimized for real-time AI streaming.

npm version npm downloads bundle size TypeScript license

Demo โ€ข Installation โ€ข AI Integration โ€ข Stack UI โ€ข Themes


โœจ Why NotifyX?

NotifyX v4 is engineered from the ground up to solve the challenges of modern web applications. Whether you are building an LLM-powered agent workflow, a Next.js SaaS, or an interactive dashboard, NotifyX delivers a pristine user experience.

Competitive Differentiation

FeatureNotifyX v4react-hot-toastsonnerreact-toastify
Stack-Based UIโœ… Elegant 3DโŒโœ…โŒ
AI/Streaming APIโœ… NativeโŒโŒโŒ
MCP-Readyโœ…โŒโŒโŒ
Web Animations APIโœ… GPU AcceleratedโŒlimitedlimited
Theme Systemโœ… 9 theme presetsโŒpartialpartial
Vanilla JS Supportโœ…โŒโŒpartial
Priority Queueโœ…โŒโŒโŒ
Zero Dependenciesโœ…โœ…โœ…โŒ
Bundle < 7KBโœ…โœ…โœ…โŒ

๐Ÿ“ฆ Installation

# npm
npm install notifyx

# pnpm
pnpm add notifyx

# bun
bun add notifyx

Setup

import NotifyX from "notifyx";
import "notifyx/style.css"; // Required for UI styling

NotifyX.success("Ready for the AI era! ๐Ÿš€");

๐Ÿ— Stack-Based UI & Priority Queue

NotifyX v4 departs from legacy list-based rendering, introducing a Stack-Based Architecture. Notifications gracefully stack with dynamic transform: scale() and translateY() 3D layering, saving vertical screen real estate while feeling incredibly premium.

Under the hood, the Priority Queue Manager handles influxes of notifications perfectly. If an application throws 20 events at once, NotifyX will instantly display the allowed maximum (maxToasts), gracefully holding the rest in memory and seamlessly rendering them as active toasts are dismissed.


๐Ÿค– AI & MCP Integration

NotifyX provides first-class support for AI metadata, rendering Model Context Protocol (MCP) tool calls, token counts, and latency flawlessly.

NotifyX.ai("Processing context...", {
  ai: {
    model: "claude-3-5-sonnet",
    toolName: "read_file",
    latencyMs: 1240,
    tokens: 450,
  },
});

It renders elegantly with a custom โœฆ icon, specialized color palettes, and a structured metadata bar showcasing agent workflow steps.


๐ŸŒŠ Streaming API

LLMs stream responses token-by-token. NotifyX's StreamingBridge ensures smooth, jank-free progressive text rendering.

const stream = NotifyX.stream("Thinking...", {
  ai: { model: "gpt-4o", streaming: true },
  position: "bottom-right",
});

// Stream chunks as they arrive
stream.update("I have found ");
stream.update("the specific bug ");
stream.update("in your code.");

// Finalize
stream.success("Analysis complete!", {
  ai: { streaming: false, latencyMs: 850 },
});

A blinking โ–‹ cursor is natively rendered while streaming is active!


โณ Promise API

Manage asynchronous workflows beautifully.

NotifyX.promise(fetch("/api/user/profile"), {
  loading: "Loading profile...",
  success: "Profile loaded!",
  error: "Failed to fetch profile",
});

๐ŸŽจ Zero-Dependency Theme System

NotifyX v4 ships with 9 theme presets defined by the ThemePreset type. All styling is vanilla CSS (no Tailwind). Import notifyx/style.css to enable them.

System themes

Adapt to the environment or force a mode:

PresetDescription
autoDefault. Monochrome surface; follows OS light/dark via prefers-color-scheme
lightForce light surfaces on all toasts
darkForce dark surfaces on all toasts

Style themes

Fixed visual identities for branded UIs:

PresetDescription
glassFrosted glassmorphism with backdrop blur
minimalClean cards with a colored left accent bar per toast type
flatTinted status backgrounds; dark variant via OS preference
neoSoft neumorphic dual-shadow; surface adapts to page light/dark
neonDark terminal panel with per-type luminous rim glow
brutalHigh-contrast brutalist: hard borders, monospace, offset shadow

Usage

// Global โ€” sets data-notifyx-theme on <html>
NotifyX.setTheme("neo");

// Per toast โ€” overrides global for one notification
NotifyX.success("Saved", { theme: "flat" });

// Default at init
NotifyX.configure({ theme: "glass" });

Calling setTheme("auto") removes data-notifyx-theme from <html> and restores OS-adaptive behavior.

Neo page mode

The neo theme uses shadow pairs that match the host page background. Set on <html>:

<html data-notifyx-mode="light">  <!-- or "dark" -->
  • Without data-notifyx-mode, neo follows prefers-color-scheme: dark on dark pages
  • data-notifyx-mode="light" keeps light neumorphic shadows even on a dark OS theme

Try the Page Light/Dark toggle in example/index.html with the Neo theme selected.

CSS hooks

For custom integrations or overrides:

  • Theme: data-notifyx-theme="{preset}" on <html> (global) or on an individual .notifyx element
  • Page mode (neo): data-notifyx-mode="light" or "dark" on <html>
  • Source: built from src/styles/themes.css, shipped as notifyx/style.css

Valid ThemePreset values: 'auto' | 'light' | 'dark' | 'glass' | 'minimal' | 'flat' | 'brutal' | 'neo' | 'neon'


๐ŸŽฌ Animation Engine

Powered by the Web Animations API for buttery-smooth 60fps rendering, bypassing Main Thread blocking.

  • spring (Default) โ€” Bouncy, physical, lively
  • slide โ€” Smooth directional translation
  • bloom โ€” Elegant scale and fade
  • flip โ€” 3D spatial rotation
  • fade โ€” Simple opacity transition
NotifyX.info("System update", { animation: "bloom" });

๐Ÿ› ๏ธ Advanced Subsystem Accessors

Because NotifyX v4 is built on a modular architecture, we expose the underlying subsystems directly on the NotifyX object for advanced control:

  • NotifyX.queue: Access the Min-Heap priority queue (ToastQueue) instance. Manage overflow, peak queued states, or manually flush items.
  • NotifyX.animation: Access the AnimationEngine directly. Hook into the Web Animations API (WAAPI) engine to apply staggerEnter, pulse, or shake animations to your own UI elements.
  • NotifyX.stream_bridge: Access the StreamBridge utility. Use its fromIterable and pipe helpers to map arbitrary LLM data streams directly into DOM nodes.

โš™๏ธ Global Configuration

NotifyX.configure({
  theme: "glass",
  animation: "spring",
  position: "top-right",
  duration: 4000,
  maxToasts: 3,
  pauseOnHover: true,
});

Engineered for the modern web โ€” awalhadi/notifyx