notistack
Stackable, customizable notification snackbars for React, shown with a hook or a single function call.
Repository Health
Technical Analysis
notistack is a React library for displaying notification snackbars (toasts) that can queue and stack on top of each other instead of replacing one another, a common gap in simpler toast libraries. As of v3 it is fully standalone, no longer requiring Material-UI as a peer dependency, though its default content component still renders in a Material Design style.
Notifications are triggered either declaratively through the useSnackbar hook or imperatively by importing the exported enqueueSnackbar/closeSnackbar functions directly, which is useful for firing notifications from outside the React tree (API clients, Redux middleware, error boundaries). Positioning, transition animation, auto-hide duration, persistence, and custom content are all configurable per-snackbar or globally via SnackbarProvider props.
What You Get
- A
SnackbarProvidercomponent that manages the queue/stack of active notifications and renders them via a React portal - A
useSnackbarhook (enqueueSnackbar,closeSnackbar) plus module-levelenqueueSnackbar/closeSnackbarexports for calling from outside React components - Default Material Design-styled snackbar content (
MaterialDesignContent) with success/error/warning/info/default variants and icons - Configurable stacking limit (
maxSnack), FIFO queueing of overflow notifications, per-snackbarpersistflag, and dedupe viapreventDuplicate - Pluggable transition components (Slide by default) and support for fully custom snackbar content components
Common Use Cases
- Showing success/error toasts after form submissions or API calls in a React app
- Surfacing background job or websocket-driven notifications that may arrive faster than a user can dismiss them
- Replacing a heavier Material-UI Snackbar setup with a purpose-built, stackable notification system
- Triggering notifications imperatively from non-component code such as an Axios interceptor or Redux middleware
Under The Hood
Architecture - SnackbarProvider is a class component that owns two pieces of state: a queue of pending snacks and a snacks array of currently displayed ones, transitioned between via small reducer-style methods (handleDisplaySnack, processQueue, handleDismissOldest, handleExitedSnack) that enforce the maxSnack cap and dismiss the oldest non-persistent snack to make room for new ones. Snacks are grouped by anchorOrigin into one SnackbarContainer per screen position, and each SnackbarItem wraps a Collapse transition around a configurable TransitionComponent (Slide by default) around the actual content — either a custom component or the default MaterialDesignContent. A React Context (SnackbarContext) exposes enqueueSnackbar/closeSnackbar to the useSnackbar hook, and the same functions are also assigned to module-level exports so they can be called imperatively from anywhere in the app, not just inside a component with hook access.
Tech Stack - Written almost entirely in TypeScript (99% of source, ~2,400 lines), built with tsdx (a Rollup wrapper) into CJS and ESM bundles plus a single index.d.ts. Runtime dependencies are minimal: clsx for conditional className composition and goober (a ~1KB CSS-in-JS engine) for style generation via a small makeStyles wrapper, avoiding a heavier styling dependency like Emotion or styled-components. React and react-dom (17/18/19) are peer dependencies only.
Code Quality - The test script in package.json is literally echo todo-test and no test files exist anywhere in the repository (src or examples), so there is no automated test coverage to verify behavior. Code is otherwise organized into small, single-purpose modules (SnackbarProvider, SnackbarItem, SnackbarContainer, ui/MaterialDesignContent, transitions/, utils/) with a centralized 430-line types.ts for all public types, consistent naming conventions, and ESLint/Prettier configs enforced in CI, but a handful of as any casts are used to route dynamic transition callback names.
API Design - The library offers two equally ergonomic entry points to the same functionality: the useSnackbar() hook for idiomatic use inside components, and directly-imported enqueueSnackbar/closeSnackbar functions for calling from anywhere, including outside the React tree. Getting started requires only wrapping the app in <SnackbarProvider> and calling enqueueSnackbar('message') — no boilerplate configuration is required for the common case, while variants, custom content, positioning, and transitions are all opt-in via well-named props documented on notistack.com.
Used by 9 apps in this directory
Automatisch
Automation · No Code Platforms
Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.
ClearFlask
Product Management · Community
Open-source feedback management and roadmap tool that lets product teams collect, prioritize, and respond to user input — with AI-powered summarization and full self-hosting control.
Dittofeed
Marketing · Automation
Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.
Flowise
Developer Tools · Automation · No Code Platforms
Drag-and-drop visual builder for AI agents, RAG pipelines, and multi-agent systems—deploy anywhere in minutes.
Gotify
Monitoring · Developer Tools
A lightweight, self-hosted push notification server that sends and receives messages in real time over WebSocket, with a sleek web UI and a native Go plugin system.
Hexabot
AI Development · Automation
Build and run agentic workflows across channels with YAML, tools, and RAG
OpenPanel
Hosting Control Panel · Devops
Docker-powered web hosting control panel that gives every user a fully isolated environment with dedicated web server, database, and networking — VPS-grade security on shared hardware.
Rowy
Low Code Platforms · Databases
Manage Firestore data in an Airtable-like spreadsheet UI and build Cloud Functions workflows directly in your browser—on your own GCP project.
Tolgee
Developer Tools
In-context localization platform that lets developers and translators edit app strings directly in the running application, with AI-powered machine translation and framework SDKs for React, Angular, Vue, and Svelte.