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

@wongyouth/toast

v0.2.0

Published

## Features

Readme

Show a notification without blocking other elements

Features

  • Dependency-free
  • Non-blocking
  • Tiny footprint (~2kb)
  • Framework-agnostic (jQuery, Vue, React, etc.)
  • Displays centered notifications
  • Fully customizable CSS
  • Fade-in/out animation by default

Usage

Get Started

toast("Clicked 2 times")

ScreenShot

Options

Hide notification after 5 seconds.

toast("Copied", { hideAfter: 5000 })

Default Option

  • hideAfter - hidding the notification after this duration
  • className - Notification Class name
  • transitionClassName - Transition Class name. check Animation below
export const defaultOption = {
  hideAfter: 2000, // in milliseconds
  className: '',
  transitionClassName: 'wy-toast', // transition class name

  // style
  backgroundColor: 'black',
  borderRadius: '2px',
  boxShadow: '0 2px 10px rgba(0, 0, 0, 0.1)',
  color: 'white',
  padding: '4px 8px',
  fontSize: '14px',

  // container style
  containerStyle: {
    position: 'fixed',
    top: '50%',
    left: '50%',
    transform: 'translate(-50%, -50%)',
    pointerEvents: 'none',
    zIndex: '999999',
  },
};

Animation

By default, using css transition to do animation. It's the same logic that Vue 3 transition is using.

.wy-toast-active {
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

.wy-toast-from {
  opacity: 0;
  transform: translateY(+20px);
}

.wy-toast-to {
  opacity: 0;
  transform: translateY(-20px);
}

If you want to customize animation, you can add your styles to overwrite the styles.

Or you can also provide a different transition className and add your own css styles. For example, with option transitionClassName: notify, you need to add 3 styles:

  • notify-active
  • notify-from
  • notify-to

ES Module, CDN

ES Module

import { toast, defaultOption } from '@wontyouth/toast'
defaultOption.hideAfter = 5000
toast("Message Copied", { hideAfter: 2000})

From CDN

<script src='https://cdn.jsdelivr.net/npm/@wongyouth/toast'></script>
<script>
  Toast.option.hideAfter = 5000
  Toast.toast('Toast')
</script>

jQuery

If jQuery is available

$.toast.option.hideAfter = 5000
$.toast("Message Copied")

credits to

License

This script was created under the MIT License.