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

tiktiktoast

v0.1.7

Published

Dynamic Island–style toast/notification library for web apps. Zero dependencies. Vanilla JS + TypeScript + WAAPI.

Readme


🌟 Overview

TikTiktoast is a Dynamic Island–style toast/notification library for web applications.
It is lightweight (~5KB gzipped), zero dependencies, accessible, and SSR-safe, built with Vanilla JS + TypeScript + Web Animations API.

Perfect for vanilla JavaScript, TypeScript, React, Next.js, Nuxt, or any modern framework.


✨ Features

  • 🏝️ Dynamic Island morphing — Pill-to-card transitions with spring easing
  • 📚 Stacking & queue — Max 5 visible, rest queued with animated reflow
  • 🔄 Promise trackingloading → success/error transitions in one API call
  • 🔁 Deduplication — Same id updates toast in place with morph animation
  • 📊 Progress bar — 2px WAAPI-animated countdown bar
  • 👆 Swipe to dismiss — Rubber-band gesture (lazy-loaded module)
  • 🌐 RTL support — Auto-detected, flips icons, text, and swipe direction
  • ♿ Accessiblerole="alert", aria-live, keyboard navigation, Alt+T focus
  • 🖥️ SSR safe — No window/document access at import time
  • 🎯 Zero dependencies — Pure Vanilla JS + TypeScript + Web Animations API
  • 🎬 Reduced motion — Respects prefers-reduced-motion: reduce
  • 🎨 Customizable — CSS variables, custom icons, custom renderers

📦 Installation

npm install tiktiktoast
yarn add tiktiktoast
pnpm add tiktiktoast

CDN (No bundler)

<script src="https://unpkg.com/tiktiktoast/dist/tiktik.umd.js"></script>
<script>
  Tiktik.success('Hello from CDN!')
</script>

🚀 Quick Start

import { Tiktik } from 'tiktiktoast'

// One line. That's it.
Tiktik.success('Changes saved!')
Tiktik.error('Something went wrong.')
Tiktik.warning('Disk space running low.')
Tiktik.info('New update available.')

📖 API

Type Shortcuts

Tiktik.success(message, options?)  // ✓ green accent
Tiktik.error(message, options?)    // ✕ red accent
Tiktik.info(message, options?)     // ℹ blue accent
Tiktik.warning(message, options?)  // ⚠ orange accent

Tiktik.showToast(options)

Tiktik.showToast({
  message: 'Hello world',
  type: 'success',        // 'success' | 'error' | 'info' | 'warning'
  duration: 3000,         // ms, default: 3000. Use Infinity for persistent
  position: 'top',        // 'top' | 'bottom'
  icon: '<svg>...</svg>', // custom SVG string or SVGElement
  progress: true,         // show countdown progress bar
  id: 'unique-key',       // dedup key — same id updates in place
  onClick: () => {},
  onDismiss: () => {}
})

Tiktik.promise(promise, options)

Tiktik.promise(fetch('/api/save'), {
  loading: 'Saving...',
  success: (data) => `Saved! ${data.name}`,
  error:   (err) => `Failed: ${err.message}`,
  duration: 3000,
})

Tiktik.dismiss(id?)

const id = Tiktik.success('Dismissible')
Tiktik.dismiss(id)   // dismiss one
Tiktik.dismiss()     // dismiss all

Tiktik.configure(defaults)

Tiktik.configure({
  type: 'info',
  duration: 5000,
  position: 'bottom',
  progress: true,
})

Tiktik.onStackChange(listener)

Tiktik.onStackChange((visible, queued) => {
  console.log(`Visible: ${visible}, Queued: ${queued}`)
})

🎨 CSS Customization

Override CSS variables on :root:

:root {
  --tiktik-bg: #1a1a2e;
  --tiktik-text: #ffffff;
  --tiktik-radius-pill: 9999px;
  --tiktik-radius-card: 24px;
  --tiktik-shadow: 0 4px 16px rgba(0,0,0,0.3);
  --tiktik-z-index: 999999;
  --tiktik-font-size: 14px;
  --tiktik-duration: 320ms;
}

📏 Bundle Size

| Chunk | Size (gzip) | | --------------- | ----------- | | Base | ~5 KB | | Gestures (lazy) | ~0.75 KB | | Promise (lazy) | ~0.5 KB |

Gesture and promise modules are lazy-loaded. Initial bundle stays lean.


🌐 Browser Support

All modern browsers with Web Animations API support:

| Chrome | Firefox | Safari | Edge | | ------ | ------- | ------ | ---- | | 36+ | 48+ | 13.1+ | 79+ |


🤝 Contributing

Contributions welcome! Open an issue or submit a pull request.


📄 License

MIT — Free for personal and commercial use.


📌 Links