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

@tarmiz/web-glass-toast

v1.2.1

Published

Modern glassmorphism toast notifications for React, lightweight UI toast, and notification messages.

Readme

@tarmiz/web-glass-toast

npm version npm weekly downloads License npm types npm downloads

Modern glassmorphism toast notifications for React.

Web Glass Toast Preview

  • Live documentation: https://web-glass-toast-documentation.vercel.app/
  • npm package: https://www.npmjs.com/package/@tarmiz/web-glass-toast

Why Use It

  • Stacked toast cards with depth and smooth transitions
  • Hover pause and resume timers
  • Swipe-to-dismiss interaction
  • Promise lifecycle helper for loading/success/error flows
  • Position control for top/bottom and left/center/right
  • Action buttons and style customization options

Installation

npm install @tarmiz/web-glass-toast

or

yarn add @tarmiz/web-glass-toast

Step 1: Add The Container Once

Mount ToastContainer near your app root.

import { ToastContainer } from "@tarmiz/web-glass-toast";
import "@tarmiz/web-glass-toast/style.css";

export function AppRoot() {
  return (
    <>
      {/* your app */}
      <ToastContainer />
    </>
  );
}

Step 2: Trigger Toasts Anywhere

Use the toast API from buttons, forms, server actions, or async workflows.

import { toast } from "@tarmiz/web-glass-toast";

export function SaveButton() {
  return <button onClick={() => toast.success("Project saved")}>Save</button>;
}

Step 3: Use Built-In Variants

toast("Default message");
toast.success("Saved successfully");
toast.error("Something went wrong");
toast.info("New updates available");
toast.warning("Please review before continuing");
toast.loading("Uploading...");

Step 4: Customize Behavior And Style

toast("File moved", {
  position: "bottom-right",
  duration: 5000,
  gradient: true,
  withIcon: true,
  withProgressLine: true,
  backgroundColor: "#101426",
  textColor: "#eef2ff",
  accentColor: "#67f38a",
  action: {
    label: "Undo",
    onClick: () => {
      // custom action
    },
  },
});

Step 5: Handle Async Operations With toast.promise

await toast.promise(
  fetch("/api/project").then(r => r.json()),
  {
    loading: "Saving project...",
    success: "Project saved",
    error: "Save failed",
  },
);

You can also pass resolver functions for success/error messages.

await toast.promise(apiCall(), {
  loading: "Processing...",
  success: result => `Done: ${result.count} items`,
  error: error => `Error: ${String(error)}`,
});

API Overview

toast(message, options?)

Core function used by all variants.

Variant helpers

  • toast.success(message, options?)
  • toast.error(message, options?)
  • toast.info(message, options?)
  • toast.warning(message, options?)
  • toast.loading(message, options?)
  • toast.custom(message, options?)

State and lifecycle helpers

  • toast.update(id, updates)
  • toast.dismiss(id?)
  • toast.pause(id)
  • toast.resume(id)
  • toast.promise(promise, messages, options?)

Options Reference

type ToastOptions = {
  id?: string;
  type?: "success" | "error" | "info" | "warning" | "loading" | "custom";
  position?:
    | "top-right"
    | "top-left"
    | "top-center"
    | "bottom-right"
    | "bottom-left"
    | "bottom-center";
  duration?: number; // 0 = persistent
  gradient?: boolean;
  dismissible?: boolean;
  withIcon?: boolean;
  withProgressLine?: boolean;
  backgroundColor?: string;
  textColor?: string;
  accentColor?: string;
  icon?: React.ReactNode;
  action?: {
    label: string;
    onClick: () => void;
  };
};

Full Example

import { ToastContainer, toast } from "@tarmiz/web-glass-toast";
import "@tarmiz/web-glass-toast/style.css";

export function App() {
  const notify = () => {
    toast.success("Welcome back", {
      position: "top-right",
      action: {
        label: "Open",
        onClick: () => console.log("Open clicked"),
      },
    });
  };

  return (
    <>
      <button onClick={notify}>Show Toast</button>
      <ToastContainer />
    </>
  );
}

Local Development

npm install
npm run build
npm run lint

License

MIT - see LICENSE