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

@mi1y/toast-mi1y

v2.0.0

Published

A simple and flexible toast notification library for Svelte 5

Readme

toast-mi1y

A simple, flexible, and modern toast notification library for Svelte 5. Easily display beautiful notifications in your SvelteKit or Svelte 5 app with minimal setup.

Screenshots

| Success | Info | Warning | Error | Confirm | |--------|------|---------|-------|-------| | Success | Info | Warning | Error | Confirm

Features

  • ⚡ Instant setup – just drop in the component
  • 🪶 Lightweight, minimal dependencies (uses Svelte's built-in fly transition)
  • 🧩 Works with Svelte 5 runes and SvelteKit
  • 🕹️ API for success, info, warning, error, and confirm toasts
  • 💬 Ready for dynamic values (e.g. i18n)

Installation

pnpm i @mi1y/toast-mi1y
# or
npm i @mi1y/toast-mi1y

Quick Start

Add the toast component to your main layout (e.g. +layout.svelte):

<script lang="ts">
  import { InitToast } from '@mi1y/toast-mi1y';
</script>

<InitToast />
<slot />

InitToast is required once in your app to mount the toast component.

Usage Examples

Import toast and use it anywhere in your app to trigger notifications:

import { toast } from '@mi1y/toast-mi1y';

toast.success("This is a sample success toast!");
toast.info("This is a sample info toast!");
toast.warning("This is a sample warning toast!");
toast.error("This is a sample error toast!");

// Dynamic values (e.g. with i18n)
toast.success($LL.success);

// Confirm toast example
let confirmResult: boolean | null = null;
async function showConfirm() {
  const result = await toast.confirm("Are you sure?");
  confirmResult = result;
}

Example Svelte usage:

<script lang="ts">
  import { InitToast, toast } from '@mi1y/toast-mi1y';

  function showSuccess() {
    toast.success("This is a sample success toast!");
  }
  function showInfo() {
    toast.info("This is a sample info toast!");
  }
  function showWarning() {
    toast.warning("This is a sample warning toast!");
  }
  function showError() {
    toast.error("This is a sample error toast!");
  }

  let confirmResult: boolean | null = null;
  async function showConfirm() {
    const result = await toast.confirm("Are you sure?");
    confirmResult = result;
  }
</script>

<div>
  <button on:click={showSuccess}>Show success toast</button>
  <button on:click={showInfo}>Show info toast</button>
  <button on:click={showWarning}>Show warning toast</button>
  <button on:click={showError}>Show error toast</button>
  <button on:click={showConfirm}>Show confirm toast</button>
  {#if confirmResult !== null}
    <p>Confirm result: {confirmResult ? 'Confirmed' : 'Cancelled'}</p>
  {/if}
</div>

<InitToast />