1.0.0 • Published 8 months ago

mandy-toast v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Simple Toast Notify

A lightweight, customizable toast notification library for web applications.

Installation

npm install simple-toast-notify

Usage

import { Toast } from 'simple-toast-notify';

// Basic usage
Toast.show({
  message: 'Hello World!'
});

// With custom options
Toast.show({
  message: 'Operation successful!',
  position: 'top-right',
  type: 'success',
  duration: 5000,
  backgroundColor: '#4caf50',
  textColor: '#ffffff'
});

Options

OptionTypeDefaultDescription
messagestringrequiredThe message to display
position'top-left' | 'top-right' | 'middle' | 'bottom-left' | 'bottom-right''top-right'Position of the toast
type'success' | 'error' | 'warning' | 'info''info'Predefined toast types
backgroundColorstringBased on typeCustom background color
textColorstringBased on typeCustom text color
durationnumber3000Duration in milliseconds

Features

  • 🎨 Customizable colors and positions
  • 🎯 TypeScript support with full type definitions
  • 🚀 Lightweight with zero dependencies
  • 💫 Smooth animations
  • 📱 Responsive design
  • 🎭 Pre-defined themes (success, error, warning, info)

License

MIT

1.0.0

8 months ago