npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

toast-23

v1.0.2

Published

A lightweight, accessible, fully-typed React toast notification library with zero dependencies.

Readme

A lightweight, accessible, fully-typed React toast notification library.

Zero runtime dependencies · CSS animations · Dark mode · Promise tracking · Queue system

npm version bundle size license


Features

  • 🎨 5 variants — success, error, warning, info, default
  • 📍 6 positions — top-right, top-left, top-center, bottom-right, bottom-left, bottom-center
  • Promise API — track async operations with loading → success / error
  • Loading toasttoast.loading() with manual update
  • 🧩 Custom JSXtoast.custom() for fully custom content
  • 🔄 Update & Deduplicate — update existing toasts via id, prevent duplicates
  • 📦 Queue system — configurable max visible toasts with +N badge
  • 🧹 Dismiss & Remove — dismiss all, remove instantly, configurable removeDelay
  • 🌙 Dark mode — automatic (prefers-color-scheme) + manual (.dark class)
  • Accessible — ARIA live regions, keyboard-navigable dismiss
  • 🎭 CSS animations — smooth enter/exit transitions, hover-pause with progress reversal
  • 🪶 Lightweight — zero runtime dependencies beyond React
  • 🔒 Fully typed — complete TypeScript API
  • 🌲 Tree-shakeable — ESM + CJS dual output
  • 🌐 Standalone APIcreateToast23() for Angular, Vue, Svelte, vanilla JS

Installation

With npm

npm install toast-23

With yarn

yarn add toast-23

With pnpm

pnpm add toast-23

Quick Start

1. Import the stylesheet

// In your app entry (e.g., main.tsx or layout.tsx)
import "toast-23/styles.css";

2. Wrap your app with the provider

import { Toast23Provider } from "toast-23";

function App() {
  return (
    <Toast23Provider position="top-right" maxVisible={5} duration={4000}>
      <YourApp />
    </Toast23Provider>
  );
}

3. Use the hook

import { useToast } from "toast-23";

function MyComponent() {
  const toast = useToast();

  return (
    <div>
      <button onClick={() => toast("Hello world!")}>Default</button>
      <button onClick={() => toast.success("Saved successfully!")}>
        Success
      </button>
      <button onClick={() => toast.error("Something went wrong")}>Error</button>
      <button onClick={() => toast.warning("Please check your input")}>
        Warning
      </button>
      <button onClick={() => toast.info("New update available")}>Info</button>
    </div>
  );
}

Documentation

Find the full API reference on official documentation

Testing

toast-23 uses Vitest with Testing Library:

# Run tests
npm test

# Watch mode
npm run test:watch

# Coverage
npm run test:coverage

CI/CD

GitHub Actions workflow at .github/workflows/ci.yml:

  • Lint — TypeScript type checking
  • Test — Vitest test suite (Node 18, 20, 22)
  • Build — Vite library build with DTS generation
  • Publish — Auto-publish to npm on version bump (requires NPM_TOKEN secret)

Suggested Improvements for v2

  • [ ] Swipe-to-dismiss on mobile
  • [ ] Stacked/collapsed mode for overflow
  • [ ] Undo action support
  • [ ] Theming via CSS custom properties (design tokens)
  • [ ] Headless mode (bring your own UI)
  • [ ] Rich content: icons, avatars, action buttons
  • [ ] Sound notifications
  • [ ] Persistent toasts (survive page navigation)

License

MIT © toast-23 contributors