toastify-pro 1.5.0 โ 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -845
- package/assets/screenshots/desktop-demo.png +0 -0
- package/dist/toastify-pro.esm.js +1294 -59
- package/dist/toastify-pro.esm.js.map +1 -1
- package/dist/toastify-pro.umd.js +1294 -59
- package/dist/toastify-pro.umd.js.map +1 -1
- package/dist/toastify-pro.umd.min.js +10 -3
- package/dist/toastify-pro.umd.min.js.map +1 -1
- package/package.json +5 -2
- package/src/toastify-pro.js +1294 -59
- package/assets/site/site.webmanifest +0 -217
package/README.md
CHANGED
|
@@ -1,930 +1,228 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<h1> ๐ Quick Start - Install Toastify Pro (JavaScript Toast Notifications) </h1>
|
|
3
|
+
# Toastify Pro
|
|
5
4
|
|
|
6
|
-
**
|
|
5
|
+
**Modern, lightweight toast notifications for JavaScript**
|
|
7
6
|
|
|
8
7
|
[](https://www.npmjs.com/package/toastify-pro)
|
|
9
8
|
[](https://www.npmjs.com/package/toastify-pro)
|
|
10
|
-
[](https://github.com/abhipotter/toastify-pro/blob/main/LICENSE)
|
|
11
9
|
[](https://bundlephobia.com/package/toastify-pro)
|
|
10
|
+
[](LICENSE)
|
|
12
11
|
|
|
13
|
-
[Demo](https://abhipotter.github.io/toastify-pro/demo)
|
|
12
|
+
[Demo](https://abhipotter.github.io/toastify-pro/demo) ยท [Documentation](https://abhipotter.github.io/toastify-pro/demo)
|
|
14
13
|
|
|
15
14
|
</div>
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## ๐ Quick Start
|
|
36
|
-
|
|
37
|
-
### ๐ฆ Installation
|
|
38
|
-
|
|
39
|
-
#### NPM (React, Node.js, etc.)
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Lightweight** โ ~2KB minified, zero dependencies
|
|
21
|
+
- **6 Themes** โ Success, error, warning, info, dark, light
|
|
22
|
+
- **7 Positions** โ All corners, centers, and center
|
|
23
|
+
- **Confirmations** โ Interactive dialogs with async support
|
|
24
|
+
- **Input Prompts** โ Text input with validation
|
|
25
|
+
- **Glassmorphism** โ Modern blur effects
|
|
26
|
+
- **Accessible** โ ARIA support, keyboard navigation
|
|
27
|
+
- **Framework Agnostic** โ Works everywhere
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
40
33
|
```bash
|
|
41
34
|
npm install toastify-pro
|
|
42
35
|
```
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
**Or use CDN:**
|
|
38
|
+
|
|
45
39
|
```html
|
|
46
40
|
<script src="https://cdn.jsdelivr.net/npm/toastify-pro/dist/toastify-pro.umd.min.js"></script>
|
|
47
41
|
```
|
|
48
42
|
|
|
49
|
-
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
50
46
|
|
|
51
|
-
#### With NPM
|
|
52
47
|
```javascript
|
|
53
48
|
import ToastifyPro from 'toastify-pro';
|
|
54
49
|
|
|
55
50
|
const toast = new ToastifyPro();
|
|
56
51
|
|
|
57
|
-
//
|
|
58
|
-
toast.success('
|
|
59
|
-
toast.error('Something went wrong
|
|
52
|
+
// Basic toasts
|
|
53
|
+
toast.success('Saved successfully!');
|
|
54
|
+
toast.error('Something went wrong');
|
|
60
55
|
toast.warning('Please check your input');
|
|
61
56
|
toast.info('New update available');
|
|
62
|
-
toast.dark('Dark themed message');
|
|
63
|
-
toast.light('Light themed message');
|
|
64
|
-
|
|
65
|
-
// Show toasts with descriptions
|
|
66
|
-
toast.success('Success!', 'Your changes have been saved successfully.');
|
|
67
|
-
toast.error('Error occurred!', 'Please check your network connection and try again.');
|
|
68
|
-
toast.info('New feature!', 'Check out our latest updates in the dashboard.');
|
|
69
|
-
|
|
70
|
-
// ๐ NEW: Confirmation dialogs
|
|
71
|
-
toast.conf('Delete this item?', (confirmed) => {
|
|
72
|
-
if (confirmed) {
|
|
73
|
-
toast.success('Item deleted successfully!');
|
|
74
|
-
} else {
|
|
75
|
-
toast.info('Delete cancelled');
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
// Confirmation with description
|
|
80
|
-
toast.conf('Are you sure?', 'This action cannot be undone.', (confirmed) => {
|
|
81
|
-
console.log('User confirmed:', confirmed);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// Advanced confirmation options
|
|
85
|
-
toast.conf('Save changes?', {
|
|
86
|
-
description: 'Your changes will be permanently saved.',
|
|
87
|
-
confirmText: 'Save',
|
|
88
|
-
cancelText: 'Discard',
|
|
89
|
-
theme: 'light', // 'dark' (default) or 'light'
|
|
90
|
-
position: 'center', // Default for confirmations
|
|
91
|
-
onConfirm: () => console.log('Confirmed!'),
|
|
92
|
-
onCancel: () => console.log('Cancelled!')
|
|
93
|
-
});
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
#### With CDN
|
|
97
|
-
```html
|
|
98
|
-
<!DOCTYPE html>
|
|
99
|
-
<html>
|
|
100
|
-
<head>
|
|
101
|
-
<title>Toastify Pro Example</title>
|
|
102
|
-
<script src="https://cdn.jsdelivr.net/npm/toastify-pro/dist/toastify-pro.umd.min.js"></script>
|
|
103
|
-
</head>
|
|
104
|
-
<body>
|
|
105
|
-
<button onclick="showToast()">Show Toast</button>
|
|
106
|
-
<button onclick="showConfirmation()">Show Confirmation</button>
|
|
107
|
-
|
|
108
|
-
<script>
|
|
109
|
-
const toast = new ToastifyPro();
|
|
110
|
-
|
|
111
|
-
function showToast() {
|
|
112
|
-
toast.success('Hello from Toastify Pro!');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function showError() {
|
|
116
|
-
toast.error('Something went wrong!');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function showCustom() {
|
|
120
|
-
toast.show('Custom message', 'info', {
|
|
121
|
-
timeout: 5000,
|
|
122
|
-
allowClose: true
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// ๐ NEW: Confirmation dialogs
|
|
127
|
-
function showConfirmation() {
|
|
128
|
-
toast.conf('Delete this item?', 'This action cannot be undone.', (confirmed) => {
|
|
129
|
-
if (confirmed) {
|
|
130
|
-
toast.success('Item deleted!');
|
|
131
|
-
} else {
|
|
132
|
-
toast.info('Delete cancelled');
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function showAdvancedConfirmation() {
|
|
138
|
-
toast.conf('Save document?', {
|
|
139
|
-
description: 'All your changes will be saved permanently.',
|
|
140
|
-
confirmText: 'Save Now',
|
|
141
|
-
cancelText: 'Cancel',
|
|
142
|
-
theme: 'light',
|
|
143
|
-
position: 'center'
|
|
144
|
-
}, (confirmed) => {
|
|
145
|
-
console.log('User decision:', confirmed);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
</script>
|
|
149
|
-
</body>
|
|
150
|
-
</html>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## ๐ API Reference
|
|
154
|
-
|
|
155
|
-
### Constructor Options
|
|
156
|
-
|
|
157
|
-
```javascript
|
|
158
|
-
const toast = new ToastifyPro({
|
|
159
|
-
position: 'bottom-center', // Position of toast container
|
|
160
|
-
timeout: 3000, // Auto-dismiss time in milliseconds
|
|
161
|
-
allowClose: true, // Show close button
|
|
162
|
-
maxLength: 100 // Maximum message length
|
|
163
|
-
});
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
#### Position Options
|
|
167
|
-
- `top-left` - Top left corner
|
|
168
|
-
- `top-right` - Top right corner
|
|
169
|
-
- `top-center` - Top center
|
|
170
|
-
- `bottom-left` - Bottom left corner
|
|
171
|
-
- `bottom-right` - Bottom right corner
|
|
172
|
-
- `bottom-center` - Bottom center (default)
|
|
173
|
-
- `center` - Perfect center of screen (ideal for confirmations)
|
|
174
|
-
|
|
175
|
-
### Methods
|
|
176
|
-
|
|
177
|
-
#### `toast.show(message, type, options)`
|
|
178
|
-
Main method to display a toast notification.
|
|
179
|
-
```javascript
|
|
180
|
-
toast.show('Custom message', 'success', {
|
|
181
|
-
timeout: 5000, // Override default timeout
|
|
182
|
-
allowClose: false, // Hide close button for this toast
|
|
183
|
-
maxLength: 50, // Override message length limit
|
|
184
|
-
description: 'Additional details about the message' // Optional description
|
|
185
|
-
});
|
|
186
|
-
```
|
|
187
57
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#### `toast.success(message, options|description)`
|
|
192
|
-
Display a success toast with green background and checkmark icon.
|
|
193
|
-
```javascript
|
|
194
|
-
toast.success('Data saved successfully!');
|
|
195
|
-
toast.success('Upload complete!', { timeout: 2000 });
|
|
196
|
-
toast.success('Success!', 'Your changes have been saved.'); // With description
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
#### `toast.error(message, options|description)`
|
|
200
|
-
Display an error toast with red background and error icon.
|
|
201
|
-
```javascript
|
|
202
|
-
toast.error('Failed to save data!');
|
|
203
|
-
toast.error('Network error occurred!', { allowClose: false });
|
|
204
|
-
toast.error('Error!', 'Please check your connection and try again.'); // With description
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
#### `toast.warning(message, options|description)`
|
|
208
|
-
Display a warning toast with orange background and warning icon.
|
|
209
|
-
```javascript
|
|
210
|
-
toast.warning('Please verify your input');
|
|
211
|
-
toast.warning('Session expires in 5 minutes', { timeout: 10000 });
|
|
212
|
-
toast.warning('Warning!', 'This action cannot be undone.'); // With description
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
#### `toast.info(message, options|description)`
|
|
216
|
-
Display an info toast with blue background and info icon.
|
|
217
|
-
```javascript
|
|
218
|
-
toast.info('New feature available!');
|
|
219
|
-
toast.info('Check your email for verification', { timeout: 0 }); // No auto-dismiss
|
|
220
|
-
toast.info('Info', 'Here are some helpful tips for you.'); // With description
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
#### `toast.dark(message, options|description)`
|
|
224
|
-
Display a dark themed toast with star icon.
|
|
225
|
-
```javascript
|
|
226
|
-
toast.dark('Dark mode enabled');
|
|
227
|
-
toast.dark('Processing in background...', { allowClose: false });
|
|
228
|
-
toast.dark('Dark Mode', 'Switched to elegant dark theme.'); // With description
|
|
58
|
+
// With description
|
|
59
|
+
toast.success('File uploaded', { description: 'document.pdf is ready' });
|
|
229
60
|
```
|
|
230
61
|
|
|
231
|
-
|
|
232
|
-
Display a light themed toast with dark text and calendar icon.
|
|
233
|
-
```javascript
|
|
234
|
-
toast.light('Light theme activated');
|
|
235
|
-
toast.light('Settings updated', { timeout: 2000 });
|
|
236
|
-
toast.light('Light Mode', 'Switched to clean light theme.'); // With description
|
|
237
|
-
```
|
|
62
|
+
---
|
|
238
63
|
|
|
239
|
-
|
|
240
|
-
Display an interactive confirmation dialog with confirm/cancel buttons. Both methods work identically.
|
|
241
|
-
|
|
242
|
-
**Features:**
|
|
243
|
-
- ๐ฏ **Center positioning** (default) for maximum attention
|
|
244
|
-
- ๐ **Single instance** - Only one confirmation at a time with shake animation
|
|
245
|
-
- โณ **Loading states** - Built-in spinner for async operations
|
|
246
|
-
- ๐จ **Custom gradients** - primaryColor & secondaryColor support
|
|
247
|
-
- ๐ฑ **Responsive** design for mobile devices
|
|
248
|
-
- โก **No auto-dismiss** - requires user interaction
|
|
249
|
-
|
|
250
|
-
**Options:**
|
|
251
|
-
| Option | Type | Default | Description |
|
|
252
|
-
|--------|------|---------|-------------|
|
|
253
|
-
| `description` | string | - | Secondary text below the message |
|
|
254
|
-
| `confirmText` | string | `'Confirm'` | Custom confirm button text |
|
|
255
|
-
| `cancelText` | string | `'Cancel'` | Custom cancel button text |
|
|
256
|
-
| `theme` | string | `'dark'` | Theme: `'dark'` or `'light'` |
|
|
257
|
-
| `position` | string | `'center'` | Any valid position |
|
|
258
|
-
| `primaryColor` | string | - | Primary gradient color (hex) |
|
|
259
|
-
| `secondaryColor` | string | - | Secondary gradient color (hex) |
|
|
260
|
-
| `onConfirm` | function | - | Callback when confirmed |
|
|
261
|
-
| `onCancel` | function | - | Callback when cancelled |
|
|
64
|
+
## Confirmation Dialogs
|
|
262
65
|
|
|
263
66
|
```javascript
|
|
264
|
-
// Simple
|
|
67
|
+
// Simple
|
|
265
68
|
toast.conf('Delete this item?', (confirmed) => {
|
|
266
|
-
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
// With description
|
|
270
|
-
toast.conf('Are you sure?', 'This action cannot be undone.', (confirmed) => {
|
|
271
|
-
console.log('User confirmed:', confirmed);
|
|
69
|
+
if (confirmed) toast.success('Deleted!');
|
|
272
70
|
});
|
|
273
71
|
|
|
274
72
|
// With options
|
|
275
73
|
toast.conf('Save changes?', {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
position: 'center'
|
|
74
|
+
description: 'This cannot be undone',
|
|
75
|
+
confirmText: 'Save',
|
|
76
|
+
cancelText: 'Discard',
|
|
77
|
+
theme: 'light'
|
|
281
78
|
}, (confirmed) => {
|
|
282
|
-
|
|
79
|
+
if (confirmed) saveData();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// Async loading
|
|
83
|
+
toast.conf('Submit form?', {
|
|
84
|
+
onConfirm: async ({ setLoading, close }) => {
|
|
85
|
+
setLoading(true);
|
|
86
|
+
await fetch('/api/submit', { method: 'POST' });
|
|
87
|
+
close();
|
|
88
|
+
toast.success('Submitted!');
|
|
89
|
+
}
|
|
283
90
|
});
|
|
284
91
|
```
|
|
285
92
|
|
|
286
|
-
|
|
287
|
-
Handle async operations with built-in loading spinner:
|
|
93
|
+
---
|
|
288
94
|
|
|
289
|
-
|
|
290
|
-
// Manual loading control
|
|
291
|
-
toast.conf('Process data?', {
|
|
292
|
-
confirmText: 'Process'
|
|
293
|
-
}, (confirmed, { setLoading, close }) => {
|
|
294
|
-
if (confirmed) {
|
|
295
|
-
setLoading(true); // Show spinner, disable buttons
|
|
296
|
-
|
|
297
|
-
fetch('/api/process')
|
|
298
|
-
.then(() => {
|
|
299
|
-
setLoading(false);
|
|
300
|
-
close();
|
|
301
|
-
toast.success('Done!');
|
|
302
|
-
})
|
|
303
|
-
.catch(() => {
|
|
304
|
-
setLoading(false);
|
|
305
|
-
close();
|
|
306
|
-
toast.error('Failed!');
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
});
|
|
95
|
+
## Input Prompts
|
|
310
96
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
await fetch('/api/data'); // Auto shows loading
|
|
316
|
-
toast.success('Data fetched!');
|
|
317
|
-
}
|
|
97
|
+
```javascript
|
|
98
|
+
// Simple
|
|
99
|
+
toast.input('What is your name?', (value) => {
|
|
100
|
+
toast.success(`Hello, ${value}!`);
|
|
318
101
|
});
|
|
319
102
|
|
|
320
|
-
// With
|
|
321
|
-
toast.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
103
|
+
// With validation
|
|
104
|
+
toast.input('Enter email', {
|
|
105
|
+
type: 'email',
|
|
106
|
+
placeholder: 'you@example.com',
|
|
107
|
+
validate: (val) => val.includes('@') || 'Invalid email',
|
|
108
|
+
onSubmit: async (email) => {
|
|
109
|
+
await subscribe(email);
|
|
110
|
+
toast.success('Subscribed!');
|
|
111
|
+
}
|
|
330
112
|
});
|
|
331
113
|
```
|
|
332
114
|
|
|
333
|
-
|
|
334
|
-
Create beautiful gradient backgrounds:
|
|
115
|
+
---
|
|
335
116
|
|
|
336
|
-
|
|
337
|
-
// Orange gradient
|
|
338
|
-
toast.conf('Custom styled!', {
|
|
339
|
-
primaryColor: '#f97316',
|
|
340
|
-
secondaryColor: '#ea580c',
|
|
341
|
-
confirmText: 'Nice!'
|
|
342
|
-
});
|
|
117
|
+
## Custom Colors
|
|
343
118
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
119
|
+
```javascript
|
|
120
|
+
// Gradient toast
|
|
121
|
+
toast.custom('Custom styled!', {
|
|
122
|
+
primaryColor: '#8b5cf6',
|
|
123
|
+
secondaryColor: '#6366f1'
|
|
348
124
|
});
|
|
349
125
|
|
|
350
|
-
//
|
|
351
|
-
toast.conf('
|
|
352
|
-
|
|
353
|
-
|
|
126
|
+
// Gradient confirmation
|
|
127
|
+
toast.conf('Continue?', {
|
|
128
|
+
primaryColor: '#f97316',
|
|
129
|
+
secondaryColor: '#ea580c'
|
|
354
130
|
});
|
|
355
131
|
```
|
|
356
132
|
|
|
357
|
-
|
|
358
|
-
Only one confirmation dialog can be open at a time. Attempting to open another will shake the existing one:
|
|
133
|
+
---
|
|
359
134
|
|
|
360
|
-
|
|
361
|
-
// First call - shows confirmation
|
|
362
|
-
toast.conf('First dialog');
|
|
135
|
+
## API Reference
|
|
363
136
|
|
|
364
|
-
|
|
365
|
-
toast.conf('Second dialog'); // Shakes first dialog!
|
|
366
|
-
```
|
|
137
|
+
### Constructor
|
|
367
138
|
|
|
368
|
-
### ๐ Enhanced Features
|
|
369
|
-
|
|
370
|
-
#### Custom SVG Icons
|
|
371
|
-
Each toast type includes beautiful vector icons that scale perfectly:
|
|
372
|
-
- **Success**: โ Checkmark circle icon
|
|
373
|
-
- **Error**: โ X circle icon
|
|
374
|
-
- **Warning**: โ Triangle warning icon
|
|
375
|
-
- **Info**: โน Info circle icon
|
|
376
|
-
- **Dark**: โ
Star icon
|
|
377
|
-
- **Light**: โ Calendar icon
|
|
378
|
-
|
|
379
|
-
#### Position-Aware Car Swipe Animations
|
|
380
|
-
Toasts automatically exit with position-aware animations:
|
|
381
|
-
- `carSwipeBottom` - For bottom positioned toasts (swipes down)
|
|
382
|
-
- `carSwipeTop` - For top positioned toasts (swipes up)
|
|
383
|
-
- `carSwipeLeft` - For left positioned toasts (swipes left)
|
|
384
|
-
- `carSwipeRight` - For right positioned toasts (swipes right)
|
|
385
|
-
- `carSwipeCenter` - For center positioned toasts (swipes down)
|
|
386
|
-
|
|
387
|
-
#### POP UP Entrance Animation
|
|
388
|
-
All toasts use the `airdropPop` entrance animation with:
|
|
389
|
-
- 4-stage rotation and scaling effects
|
|
390
|
-
- Professional iOS-inspired timing
|
|
391
|
-
- Smooth cubic-bezier transitions
|
|
392
|
-
|
|
393
|
-
## ๐จ Customization
|
|
394
|
-
|
|
395
|
-
### Global Configuration
|
|
396
139
|
```javascript
|
|
397
140
|
const toast = new ToastifyPro({
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
141
|
+
position: 'bottom-center', // Position on screen
|
|
142
|
+
timeout: 3000, // Auto-dismiss (0 to disable)
|
|
143
|
+
allowClose: true, // Show close button
|
|
144
|
+
pauseOnHover: true, // Pause timeout on hover
|
|
145
|
+
maxToasts: 0, // Max visible (0 = unlimited)
|
|
146
|
+
newestOnTop: true // Stack order
|
|
402
147
|
});
|
|
403
148
|
```
|
|
404
149
|
|
|
405
|
-
###
|
|
406
|
-
```javascript
|
|
407
|
-
// Persistent toast (no auto-dismiss)
|
|
408
|
-
toast.error('Critical error!', { timeout: 0 });
|
|
150
|
+
### Positions
|
|
409
151
|
|
|
410
|
-
|
|
411
|
-
toast.success('Saved!', { timeout: 1000 });
|
|
152
|
+
`top-left` ยท `top-center` ยท `top-right` ยท `bottom-left` ยท `bottom-center` ยท `bottom-right` ยท `center`
|
|
412
153
|
|
|
413
|
-
|
|
414
|
-
toast.info('Update Available', {
|
|
415
|
-
description: 'Version 2.0 is now available with new features and improvements.',
|
|
416
|
-
timeout: 8000,
|
|
417
|
-
allowClose: true
|
|
418
|
-
});
|
|
419
|
-
|
|
420
|
-
// Toast with description - simple format
|
|
421
|
-
toast.success('Welcome!', 'Thanks for joining our platform. Explore the features!');
|
|
422
|
-
|
|
423
|
-
// Long message with close button
|
|
424
|
-
toast.info('This is a very long message that might be truncated', {
|
|
425
|
-
maxLength: 200,
|
|
426
|
-
allowClose: true,
|
|
427
|
-
timeout: 8000
|
|
428
|
-
});
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
### Custom Styling
|
|
432
|
-
You can override the default styles by adding your own CSS:
|
|
433
|
-
|
|
434
|
-
```css
|
|
435
|
-
/* Custom positioning */
|
|
436
|
-
.toastify-pro-container.bottom-center {
|
|
437
|
-
bottom: 50px; /* Adjust distance from bottom */
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/* Custom toast appearance */
|
|
441
|
-
.toastify-pro {
|
|
442
|
-
border-radius: 12px;
|
|
443
|
-
font-family: 'Inter', sans-serif;
|
|
444
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/* Custom success color */
|
|
448
|
-
.toastify-pro.success {
|
|
449
|
-
background: rgba(34, 197, 94, 0.95);
|
|
450
|
-
}
|
|
154
|
+
### Methods
|
|
451
155
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
156
|
+
| Method | Description |
|
|
157
|
+
|--------|-------------|
|
|
158
|
+
| `success(msg, opts?)` | Green success toast |
|
|
159
|
+
| `error(msg, opts?)` | Red error toast |
|
|
160
|
+
| `warning(msg, opts?)` | Orange warning toast |
|
|
161
|
+
| `info(msg, opts?)` | Blue info toast |
|
|
162
|
+
| `dark(msg, opts?)` | Dark theme toast |
|
|
163
|
+
| `light(msg, opts?)` | Light theme toast |
|
|
164
|
+
| `custom(msg, opts?)` | Custom colors |
|
|
165
|
+
| `conf(msg, opts?, cb?)` | Confirmation dialog |
|
|
166
|
+
| `input(msg, opts?, cb?)` | Input prompt |
|
|
167
|
+
| `dismissAll(type?)` | Dismiss all toasts |
|
|
168
|
+
|
|
169
|
+
### Toast Options
|
|
170
|
+
|
|
171
|
+
```javascript
|
|
172
|
+
{
|
|
173
|
+
description: 'Secondary text',
|
|
174
|
+
timeout: 5000,
|
|
175
|
+
allowClose: true,
|
|
176
|
+
action: {
|
|
177
|
+
label: 'Undo',
|
|
178
|
+
onClick: ({ close }) => { /* ... */ }
|
|
179
|
+
}
|
|
456
180
|
}
|
|
457
181
|
```
|
|
458
182
|
|
|
459
|
-
|
|
183
|
+
### Confirmation Options
|
|
460
184
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
timeout: 3000
|
|
473
|
-
}));
|
|
474
|
-
}, []);
|
|
475
|
-
|
|
476
|
-
const handleSuccess = () => {
|
|
477
|
-
toast?.success('React integration works perfectly!');
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
const handleError = () => {
|
|
481
|
-
toast?.error('Something went wrong in React!');
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
const handleWithDescription = () => {
|
|
485
|
-
toast?.info('New Feature!', 'Check out our latest React integration updates.');
|
|
486
|
-
};
|
|
487
|
-
|
|
488
|
-
// ๐ NEW: Confirmation dialog examples
|
|
489
|
-
const handleDelete = () => {
|
|
490
|
-
toast?.conf('Delete item?', 'This action cannot be undone.', (confirmed) => {
|
|
491
|
-
if (confirmed) {
|
|
492
|
-
// Perform deletion logic
|
|
493
|
-
console.log('Deleting item...');
|
|
494
|
-
toast?.success('Item deleted successfully!');
|
|
495
|
-
} else {
|
|
496
|
-
toast?.info('Delete cancelled');
|
|
497
|
-
}
|
|
498
|
-
});
|
|
499
|
-
};
|
|
500
|
-
|
|
501
|
-
const handleLogout = () => {
|
|
502
|
-
toast?.conf('Sign out?', {
|
|
503
|
-
description: 'You will need to sign in again to access your account.',
|
|
504
|
-
confirmText: 'Sign Out',
|
|
505
|
-
cancelText: 'Stay Signed In',
|
|
506
|
-
theme: 'dark',
|
|
507
|
-
position: 'center'
|
|
508
|
-
}, (confirmed) => {
|
|
509
|
-
if (confirmed) {
|
|
510
|
-
// Logout logic
|
|
511
|
-
window.location.href = '/login';
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
const handleIconDemo = () => {
|
|
517
|
-
// Showcase different icons with descriptions
|
|
518
|
-
toast?.success('โ Success Icon', 'Beautiful checkmark with green theme');
|
|
519
|
-
setTimeout(() => toast?.error('โ Error Icon', 'Clear error indication with red theme'), 500);
|
|
520
|
-
setTimeout(() => toast?.warning('โ Warning Icon', 'Alert triangle with orange theme'), 1000);
|
|
521
|
-
setTimeout(() => toast?.info('โน Info Icon', 'Information circle with blue theme'), 1500);
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
return (
|
|
525
|
-
<div>
|
|
526
|
-
<button onClick={handleSuccess}>Show Success</button>
|
|
527
|
-
<button onClick={handleError}>Show Error</button>
|
|
528
|
-
<button onClick={handleWithDescription}>Show with Description</button>
|
|
529
|
-
<button onClick={handleIconDemo}>Demo All Icons</button>
|
|
530
|
-
<button onClick={handleDelete}>Delete with Confirmation</button>
|
|
531
|
-
<button onClick={handleLogout}>Logout Confirmation</button>
|
|
532
|
-
</div>
|
|
533
|
-
);
|
|
185
|
+
```javascript
|
|
186
|
+
{
|
|
187
|
+
description: 'Details text',
|
|
188
|
+
confirmText: 'Confirm',
|
|
189
|
+
cancelText: 'Cancel',
|
|
190
|
+
theme: 'dark', // 'dark' | 'light'
|
|
191
|
+
position: 'center',
|
|
192
|
+
primaryColor: '#6366f1', // Custom gradient
|
|
193
|
+
secondaryColor: '#8b5cf6',
|
|
194
|
+
onConfirm: (helpers) => {},
|
|
195
|
+
onCancel: () => {}
|
|
534
196
|
}
|
|
535
|
-
|
|
536
|
-
export default App;
|
|
537
197
|
```
|
|
538
198
|
|
|
539
|
-
###
|
|
540
|
-
```vue
|
|
541
|
-
<template>
|
|
542
|
-
<div>
|
|
543
|
-
<button @click="showSuccess">Show Success</button>
|
|
544
|
-
<button @click="showError">Show Error</button>
|
|
545
|
-
<button @click="showCustom">Show Custom</button>
|
|
546
|
-
<button @click="showConfirmation">Show Confirmation</button>
|
|
547
|
-
<button @click="showDeleteConfirmation">Delete Item</button>
|
|
548
|
-
</div>
|
|
549
|
-
</template>
|
|
550
|
-
|
|
551
|
-
<script>
|
|
552
|
-
import ToastifyPro from 'toastify-pro';
|
|
553
|
-
|
|
554
|
-
export default {
|
|
555
|
-
name: 'ToastExample',
|
|
556
|
-
data() {
|
|
557
|
-
return {
|
|
558
|
-
toast: null
|
|
559
|
-
};
|
|
560
|
-
},
|
|
561
|
-
mounted() {
|
|
562
|
-
this.toast = new ToastifyPro({
|
|
563
|
-
position: 'bottom-right',
|
|
564
|
-
timeout: 4000
|
|
565
|
-
});
|
|
566
|
-
},
|
|
567
|
-
methods: {
|
|
568
|
-
showSuccess() {
|
|
569
|
-
this.toast.success('Vue.js integration successful!');
|
|
570
|
-
},
|
|
571
|
-
showError() {
|
|
572
|
-
this.toast.error('Error in Vue component!');
|
|
573
|
-
},
|
|
574
|
-
showCustom() {
|
|
575
|
-
this.toast.show('Custom Vue message', 'warning', {
|
|
576
|
-
timeout: 6000,
|
|
577
|
-
allowClose: true
|
|
578
|
-
});
|
|
579
|
-
},
|
|
580
|
-
// ๐ NEW: Confirmation methods
|
|
581
|
-
showConfirmation() {
|
|
582
|
-
this.toast.conf('Save changes?', (confirmed) => {
|
|
583
|
-
if (confirmed) {
|
|
584
|
-
this.saveData();
|
|
585
|
-
} else {
|
|
586
|
-
this.toast.info('Changes not saved');
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
},
|
|
590
|
-
showDeleteConfirmation() {
|
|
591
|
-
this.toast.conf('Delete this item?', {
|
|
592
|
-
description: 'This action cannot be undone and will remove all associated data.',
|
|
593
|
-
confirmText: 'Delete',
|
|
594
|
-
cancelText: 'Keep',
|
|
595
|
-
theme: 'dark',
|
|
596
|
-
position: 'center'
|
|
597
|
-
}, (confirmed) => {
|
|
598
|
-
if (confirmed) {
|
|
599
|
-
this.deleteItem();
|
|
600
|
-
this.toast.success('Item deleted successfully!');
|
|
601
|
-
}
|
|
602
|
-
});
|
|
603
|
-
},
|
|
604
|
-
saveData() {
|
|
605
|
-
// Save logic here
|
|
606
|
-
this.toast.success('Data saved successfully!');
|
|
607
|
-
},
|
|
608
|
-
deleteItem() {
|
|
609
|
-
// Delete logic here
|
|
610
|
-
console.log('Item deleted');
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
</script>
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
### Angular Integration
|
|
618
|
-
```typescript
|
|
619
|
-
import { Component, OnInit } from '@angular/core';
|
|
620
|
-
import ToastifyPro from 'toastify-pro';
|
|
199
|
+
### Input Options
|
|
621
200
|
|
|
622
|
-
@Component({
|
|
623
|
-
selector: 'app-toast-example',
|
|
624
|
-
template: `
|
|
625
|
-
<button (click)="showSuccess()">Show Success</button>
|
|
626
|
-
<button (click)="showError()">Show Error</button>
|
|
627
|
-
<button (click)="showInfo()">Show Info</button>
|
|
628
|
-
<button (click)="showConfirmation()">Show Confirmation</button>
|
|
629
|
-
<button (click)="showLogoutConfirmation()">Logout</button>
|
|
630
|
-
`
|
|
631
|
-
})
|
|
632
|
-
export class ToastExampleComponent implements OnInit {
|
|
633
|
-
private toast: ToastifyPro;
|
|
634
|
-
|
|
635
|
-
ngOnInit() {
|
|
636
|
-
this.toast = new ToastifyPro({
|
|
637
|
-
position: 'top-center',
|
|
638
|
-
timeout: 3500,
|
|
639
|
-
allowClose: true
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
showSuccess() {
|
|
644
|
-
this.toast.success('Angular integration works!');
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
showError() {
|
|
648
|
-
this.toast.error('Error in Angular component!');
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
showInfo() {
|
|
652
|
-
this.toast.info('Information from Angular', {
|
|
653
|
-
timeout: 5000
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
// ๐ NEW: Confirmation methods
|
|
658
|
-
showConfirmation() {
|
|
659
|
-
this.toast.conf('Save document?', 'All changes will be saved permanently.', (confirmed: boolean) => {
|
|
660
|
-
if (confirmed) {
|
|
661
|
-
this.saveDocument();
|
|
662
|
-
} else {
|
|
663
|
-
this.toast.info('Save cancelled');
|
|
664
|
-
}
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
showLogoutConfirmation() {
|
|
669
|
-
this.toast.conf('Sign out?', {
|
|
670
|
-
description: 'You will be logged out of your account.',
|
|
671
|
-
confirmText: 'Sign Out',
|
|
672
|
-
cancelText: 'Cancel',
|
|
673
|
-
theme: 'light',
|
|
674
|
-
position: 'center'
|
|
675
|
-
}, (confirmed: boolean) => {
|
|
676
|
-
if (confirmed) {
|
|
677
|
-
this.logout();
|
|
678
|
-
}
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
private saveDocument() {
|
|
683
|
-
// Save logic
|
|
684
|
-
this.toast.success('Document saved successfully!');
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
private logout() {
|
|
688
|
-
// Logout logic
|
|
689
|
-
this.toast.success('Logged out successfully!');
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
### Vanilla JavaScript Examples
|
|
695
201
|
```javascript
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
const response = await fetch('/api/submit', { method: 'POST' });
|
|
710
|
-
|
|
711
|
-
if (response.ok) {
|
|
712
|
-
toast.success('Form submitted successfully!', 'Your data has been processed and saved.');
|
|
713
|
-
} else {
|
|
714
|
-
toast.error('Failed to submit form', 'Please check your inputs and try again.');
|
|
715
|
-
}
|
|
716
|
-
} catch (error) {
|
|
717
|
-
toast.error('Network error occurred', 'Check your connection and retry.');
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
});
|
|
722
|
-
|
|
723
|
-
// Delete confirmation example
|
|
724
|
-
function deleteItem(itemId) {
|
|
725
|
-
toast.conf('Delete this item?', {
|
|
726
|
-
description: 'This action cannot be undone and will permanently remove all associated data.',
|
|
727
|
-
confirmText: 'Delete',
|
|
728
|
-
cancelText: 'Keep',
|
|
729
|
-
theme: 'dark',
|
|
730
|
-
position: 'center'
|
|
731
|
-
}, (confirmed) => {
|
|
732
|
-
if (confirmed) {
|
|
733
|
-
// Perform deletion
|
|
734
|
-
console.log('Deleting item:', itemId);
|
|
735
|
-
toast.success('Item deleted!', 'The item has been permanently removed.');
|
|
736
|
-
} else {
|
|
737
|
-
toast.info('Delete cancelled', 'Your item is safe.');
|
|
738
|
-
}
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
// File upload with confirmation and progress
|
|
743
|
-
function handleFileUpload() {
|
|
744
|
-
toast.conf('Upload file?', 'The file will be uploaded to your account.', (confirmed) => {
|
|
745
|
-
if (confirmed) {
|
|
746
|
-
toast.info('Uploading...', 'Please wait while we process your file.');
|
|
747
|
-
|
|
748
|
-
// Simulate upload completion
|
|
749
|
-
setTimeout(() => {
|
|
750
|
-
toast.success('Upload complete!', 'Your file has been uploaded successfully.');
|
|
751
|
-
}, 3000);
|
|
752
|
-
}
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
// Logout confirmation
|
|
757
|
-
function logout() {
|
|
758
|
-
toast.conf('Sign out?', {
|
|
759
|
-
description: 'You will need to sign in again to access your account.',
|
|
760
|
-
confirmText: 'Sign Out',
|
|
761
|
-
cancelText: 'Stay Signed In',
|
|
762
|
-
theme: 'light'
|
|
763
|
-
}, (confirmed) => {
|
|
764
|
-
if (confirmed) {
|
|
765
|
-
window.location.href = '/login';
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// Multiple toast types with descriptions
|
|
771
|
-
function showAllTypes() {
|
|
772
|
-
toast.success('Success!', 'Operation completed successfully');
|
|
773
|
-
setTimeout(() => toast.error('Error!', 'Something went wrong'), 500);
|
|
774
|
-
setTimeout(() => toast.warning('Warning!', 'Please review this action'), 1000);
|
|
775
|
-
setTimeout(() => toast.info('Info', 'Here is some helpful information'), 1500);
|
|
776
|
-
setTimeout(() => toast.dark('Dark Mode', 'Elegant dark notification'), 2000);
|
|
777
|
-
setTimeout(() => toast.light('Light Mode', 'Clean light notification'), 2500);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
// Showcase new enhanced features including confirmations
|
|
781
|
-
function demoEnhancedFeatures() {
|
|
782
|
-
// SVG Icons demo
|
|
783
|
-
toast.success('โ Beautiful Icons', 'Each type has its own vector icon that scales perfectly');
|
|
784
|
-
|
|
785
|
-
// Car swipe animation (automatic based on position)
|
|
786
|
-
setTimeout(() => {
|
|
787
|
-
toast.info('๐ Car Swipe Exit', 'Watch the position-aware exit animation');
|
|
788
|
-
}, 1000);
|
|
789
|
-
|
|
790
|
-
// Apple AirDrop entrance (automatic)
|
|
791
|
-
setTimeout(() => {
|
|
792
|
-
toast.warning('๐ฑ AirDrop Style', 'iOS-inspired entrance with rotation effects');
|
|
793
|
-
}, 2000);
|
|
794
|
-
|
|
795
|
-
// Glassmorphism design
|
|
796
|
-
setTimeout(() => {
|
|
797
|
-
toast.dark('โจ Glassmorphism', 'Modern backdrop blur with translucent design');
|
|
798
|
-
}, 3000);
|
|
799
|
-
|
|
800
|
-
// ๐ Confirmation dialog demo
|
|
801
|
-
setTimeout(() => {
|
|
802
|
-
toast.conf('Try confirmation?', 'Experience the new interactive dialog feature.', (confirmed) => {
|
|
803
|
-
if (confirmed) {
|
|
804
|
-
toast.success('๐ Confirmation works!', 'You can now create interactive dialogs easily.');
|
|
805
|
-
} else {
|
|
806
|
-
toast.info('No problem!', 'Confirmation dialogs are optional.');
|
|
807
|
-
}
|
|
808
|
-
});
|
|
809
|
-
}, 4000);
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
// Advanced confirmation examples
|
|
813
|
-
function advancedConfirmationExamples() {
|
|
814
|
-
// Settings reset confirmation
|
|
815
|
-
toast.conf('Reset all settings?', {
|
|
816
|
-
description: 'This will restore all settings to their default values.',
|
|
817
|
-
confirmText: 'Reset',
|
|
818
|
-
cancelText: 'Cancel',
|
|
819
|
-
theme: 'dark',
|
|
820
|
-
position: 'center'
|
|
821
|
-
}, (confirmed) => {
|
|
822
|
-
if (confirmed) {
|
|
823
|
-
// Reset settings logic
|
|
824
|
-
toast.success('Settings reset!', 'All settings have been restored to defaults.');
|
|
825
|
-
}
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
// Advanced usage with all new features
|
|
830
|
-
function advancedExample() {
|
|
831
|
-
// Progress indication with confirmation first
|
|
832
|
-
toast.conf('Start processing?', {
|
|
833
|
-
description: 'This will upload your file to the server and may take a few minutes.',
|
|
834
|
-
confirmText: 'Start',
|
|
835
|
-
cancelText: 'Later',
|
|
836
|
-
theme: 'light'
|
|
837
|
-
}, (confirmed) => {
|
|
838
|
-
if (confirmed) {
|
|
839
|
-
toast.info('Processing...', {
|
|
840
|
-
description: 'Please wait while we upload your file to the server',
|
|
841
|
-
timeout: 0, // No auto-dismiss
|
|
842
|
-
allowClose: true
|
|
843
|
-
});
|
|
844
|
-
|
|
845
|
-
// Simulate progress completion
|
|
846
|
-
setTimeout(() => {
|
|
847
|
-
toast.success('Upload Complete!', {
|
|
848
|
-
description: 'Your file has been uploaded successfully with all metadata',
|
|
849
|
-
timeout: 5000
|
|
850
|
-
});
|
|
851
|
-
}, 3000);
|
|
852
|
-
}
|
|
853
|
-
});
|
|
202
|
+
{
|
|
203
|
+
description: 'Help text',
|
|
204
|
+
placeholder: 'Enter value...',
|
|
205
|
+
submitText: 'Submit',
|
|
206
|
+
cancelText: 'Cancel',
|
|
207
|
+
type: 'text', // 'text' | 'email' | 'password' | 'number' | 'url'
|
|
208
|
+
defaultValue: '',
|
|
209
|
+
required: true,
|
|
210
|
+
validate: (val) => true, // Return true or error string
|
|
211
|
+
theme: 'dark',
|
|
212
|
+
primaryColor: '#6366f1',
|
|
213
|
+
onSubmit: (value, helpers) => {},
|
|
214
|
+
onCancel: () => {}
|
|
854
215
|
}
|
|
855
216
|
```
|
|
856
217
|
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
| Browser | Version |
|
|
860
|
-
|---------|---------|
|
|
861
|
-
| Chrome | โฅ 60 |
|
|
862
|
-
| Firefox | โฅ 55 |
|
|
863
|
-
| Safari | โฅ 12 |
|
|
864
|
-
| Edge | โฅ 79 |
|
|
865
|
-
|
|
866
|
-
## โ๏ธ Configuration Options
|
|
867
|
-
|
|
868
|
-
| Option | Type | Default | Description |
|
|
869
|
-
|--------|------|---------|-------------|
|
|
870
|
-
| `position` | string | `'bottom-center'` | Toast container position |
|
|
871
|
-
| `timeout` | number | `3000` | Auto-dismiss time (0 = no auto-dismiss) |
|
|
872
|
-
| `allowClose` | boolean | `true` | Show close button |
|
|
873
|
-
| `maxLength` | number | `100` | Maximum message length |
|
|
874
|
-
| `description` | string | `undefined` | Optional secondary text for detailed information |
|
|
875
|
-
|
|
876
|
-
## ๐จ Available Themes
|
|
877
|
-
|
|
878
|
-
| Theme | Background | Text Color | Icon | Use Case |
|
|
879
|
-
|-------|------------|------------|------|----------|
|
|
880
|
-
| `success` | Green | White | โ Checkmark | Success messages |
|
|
881
|
-
| `error` | Red | White | โ X Circle | Error messages |
|
|
882
|
-
| `warning` | Orange | White | โ Triangle | Warning messages |
|
|
883
|
-
| `info` | Blue | White | โน Info Circle | Information messages |
|
|
884
|
-
| `dark` | Dark Gray | White | โ
Star | General purpose |
|
|
885
|
-
| `light` | Light Gray | Black | โ Calendar | Light theme compatibility |
|
|
886
|
-
|
|
887
|
-
### ๐ Enhanced Visual Features
|
|
888
|
-
|
|
889
|
-
- **Custom SVG Icons**: Each theme includes beautiful vector icons that are crisp at any resolution
|
|
890
|
-
- **Glassmorphism Design**: Modern backdrop-filter blur effects with translucent backgrounds
|
|
891
|
-
- **Car Swipe Animations**: Position-aware exit animations that swipe toasts in natural directions
|
|
892
|
-
- **POP UP Entrance**: Professional iOS-inspired entrance with 4-stage rotation and scaling
|
|
893
|
-
- **Progress Bar**: Animated progress bar with shimmer effects showing remaining time
|
|
894
|
-
- **Responsive Design**: Mobile-first approach that adapts to all screen sizes
|
|
895
|
-
|
|
896
|
-
## ๐ License
|
|
897
|
-
|
|
898
|
-
MIT ยฉ [Abhishek Potter](https://github.com/abhipotter)
|
|
899
|
-
|
|
900
|
-
## ๐ค Contributing
|
|
901
|
-
|
|
902
|
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
903
|
-
|
|
904
|
-
1. Fork the repository
|
|
905
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
906
|
-
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
907
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
908
|
-
5. Open a Pull Request
|
|
909
|
-
|
|
910
|
-
## ๐ง Support
|
|
911
|
-
|
|
912
|
-
- ๐ **Bug Reports**: [GitHub Issues](https://github.com/abhipotter/toastify-pro/issues)
|
|
913
|
-
- ๐ฌ **Discussions**: [GitHub Discussions](https://github.com/abhipotter/toastify-pro/discussions)
|
|
914
|
-
- ๐ง **Email**: [abhishekpotter77@gmail.com](mailto:abhishekpotter77@gmail.com)
|
|
218
|
+
---
|
|
915
219
|
|
|
916
|
-
##
|
|
220
|
+
## Browser Support
|
|
917
221
|
|
|
918
|
-
|
|
919
|
-
- Built with โค๏ธ by the open-source community
|
|
920
|
-
- Special thanks to all contributors
|
|
222
|
+
Chrome, Firefox, Safari, Edge (all modern versions)
|
|
921
223
|
|
|
922
224
|
---
|
|
923
225
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
**Made with โค๏ธ by [Abhishek Potter](https://github.com/abhipotter)**
|
|
927
|
-
|
|
928
|
-
If you found this project helpful, please consider giving it a โญ๏ธ!
|
|
226
|
+
## License
|
|
929
227
|
|
|
930
|
-
|
|
228
|
+
MIT ยฉ [Abhishek Potter](https://github.com/abhipotter)
|