mandy-toast
v1.0.0
Published
A customizable toast notification library for web applications
Maintainers
Readme
Simple Toast Notify
A lightweight, customizable toast notification library for web applications.
Installation
npm install simple-toast-notifyUsage
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
| Option | Type | Default | Description | |--------|------|---------|-------------| | message | string | required | The 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 | | backgroundColor | string | Based on type | Custom background color | | textColor | string | Based on type | Custom text color | | duration | number | 3000 | Duration 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
