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 🙏

© 2025 – Pkg Stats / Ryan Hefner

asthetic-toaster-library

v1.0.0

Published

A lightweight, customizable toast notification library for React applications

Downloads

5

Readme

🍞 Toast Library Demo

This is a comprehensive demo application showcasing the features of the my-toast-library React toast notification library.

🚀 Quick Start

  1. Install dependencies:

    npm install
  2. Start the development server:

    npm start
  3. Open your browser: Navigate to http://localhost:3000

📋 Features Demonstrated

Basic Toast Types

  • Success Toasts - Green notifications for successful operations
  • Error Toasts - Red notifications for errors and failures
  • Warning Toasts - Orange notifications for warnings
  • Info Toasts - Blue notifications for informational messages

Advanced Features

  • 🎯 Custom Positions - Show toasts in different screen positions
  • 🎨 Custom Styling - Apply custom CSS classes and inline styles
  • Persistent Toasts - Toasts that don't auto-close
  • 📱 Multiple Toasts - Display several toasts simultaneously
  • 🧹 Toast Management - Clear all toasts with one click

Technical Features

  • 📱 Responsive Design - Works perfectly on all device sizes
  • Smooth Animations - Beautiful slide-in and slide-out effects
  • 🎛️ Configurable - Customize duration, position, and styling
  • 🔧 TypeScript Support - Full type safety and IntelliSense

🛠️ How It Works

This demo uses npm link to connect to your local toast library:

# In the demo directory
npm link my-toast-library

This allows you to test changes to your library in real-time without publishing to npm.

🎮 Interactive Demo

The demo includes interactive buttons for each feature:

  1. Basic Toast Types - Test different toast types
  2. Advanced Features - Explore custom positioning and styling
  3. Toast Management - See current toast count and clear all
  4. Features List - Overview of all available features

🔧 Development

Project Structure

demo/
├── src/
│   ├── App.tsx          # Main demo application
│   ├── App.css          # Beautiful styling
│   └── index.tsx        # React entry point
├── public/              # Static assets
├── package.json         # Dependencies and scripts
└── README.md           # This file

Available Scripts

  • npm start - Start development server
  • npm run build - Build for production
  • npm test - Run tests
  • npm run eject - Eject from Create React App

🎨 Customization

The demo showcases how to customize toasts:

// Custom styled toast
addToast({
  message: 'Custom styled toast!',
  type: 'info',
  className: 'my-custom-toast',
  style: {
    backgroundColor: '#9c27b0',
    borderRadius: '20px',
    fontSize: '16px'
  }
});

// Custom position
addToast({
  message: 'Bottom-center toast!',
  type: 'success',
  position: 'bottom-center'
});

// Persistent toast (no auto-close)
addToast({
  message: 'This won\'t auto-close',
  type: 'warning',
  duration: 0
});

📱 Responsive Design

The demo is fully responsive and works on:

  • 📱 Mobile phones
  • 📱 Tablets
  • 💻 Desktop computers
  • 🖥️ Large screens

🔗 Library Integration

This demo shows how to integrate the toast library into a React application:

import { ToastProvider, useToast } from 'my-toast-library';

function App() {
  return (
    <ToastProvider 
      maxToasts={5}
      defaultPosition="top-right"
      defaultDuration={3000}
      defaultType="info"
    >
      <YourApp />
    </ToastProvider>
  );
}

🚀 Next Steps

  1. Test the demo - Try all the interactive features
  2. Modify the library - Make changes to your toast library
  3. See changes instantly - Thanks to npm link, changes appear immediately
  4. Publish when ready - When satisfied, publish your library to npm

📚 Documentation

For complete documentation of the toast library, see the main project README.


Happy coding! 🎉