-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
680 lines (647 loc) · 35.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" href="assets/images/logo.png" type="image/x-icon">
<title>Ripple Notify - A simple and lightweight toastr library</title>
<link href="https://cdn.jsdelivr.net/npm/prismjs/themes/prism.css" rel="stylesheet">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
<link rel="stylesheet" href="node_modules/ripple-notify/styles.css">
<link rel="stylesheet" href="output/styles.css">
</head>
<body>
<section>
<div class="container mx-auto">
<div class="flex justify-center items-center min-h-screen">
<div class="pt-40">
<div class="text-center">
<h1 class="text-gray-800 text-6xl font-bold font-lobster leading-relaxed">Ripple Notify</h1>
<p class="text-gray-600 text-sm leading-relaxed">A simple and lightweight toastr library</p>
<div class="flex justify-center items-center gap-5 my-5">
<a href="https://github.com/MdRubelRana/ripple-notify?tab=readme-ov-file" target="_blank"
class="bg-gray-800 border border-gray-800 shadow text-white text-sm font-medium w-36 inline-block py-2.5 rounded-md">GitHub</a>
<a href="https://www.npmjs.com/package/ripple-notify" target="_blank"
class="bg-gray-50 border border-gray-100 shadow text-gray-800 text-sm font-medium w-36 inline-block py-2.5 rounded-md">NPM</a>
</div>
</div>
<div>
<div class="container mx-auto max-w-screen-md my-24 space-y-10">
<p class="text-gray-600 text-sm leading-6">Ripple notify is a sleek and efficient notification package designed to deliver subtle yet effective alerts across various digital platforms. Its intuitive design seamlessly integrates into web and mobile applications, providing unobtrusive notifications that capture user attention without disrupting workflow. Stay informed with Ripple notify's prompt and seamless communication.</p>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Installation</h2>
<p class="">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">npm i ripple-notify</code></pre>
</p>
</div>
<div x-data="{ activeType: 'default' }" class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Types</h2>
<p class="text-gray-600 text-sm leading-relaxed">You can customize the type of toast you
want to render, and pass an
options object as the second argument.</p>
<div class="">
<ul class="my-4 flex justify-start items-center gap-5">
<li>
<button @click="activeType = 'default'"
:class="{ 'bg-gray-100': activeType === 'default' }"
onclick="ripple.default('Event has been created.')"
class="bg-gray-50 hover:bg-gray-100 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Default
</button>
</li>
<li>
<button @click="activeType = 'success'"
:class="{ 'bg-gray-100': activeType === 'success' }"
onclick="ripple.success('You have achieved your goal 🏆')"
class="bg-gray-50 hover:bg-gray-100 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Success
</button>
</li>
<li>
<button @click="activeType = 'info'"
:class="{ 'bg-gray-100': activeType === 'info' }"
onclick="ripple.info('Please provide more information.')"
class="bg-gray-50 hover:bg-gray-100 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Info
</button>
</li>
<li>
<button @click="activeType = 'warning'"
:class="{ 'bg-gray-100': activeType === 'warning' }"
onclick="ripple.warning('Warning! This action is irreversible.')"
class="bg-gray-50 hover:bg-gray-100 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Warning
</button>
</li>
<li>
<button @click="activeType = 'error'"
:class="{ 'bg-gray-100': activeType === 'error' }"
onclick="ripple.error('Oops! Something went wrong.')"
class="bg-gray-50 hover:bg-gray-100 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Error
</button>
</li>
</ul>
</div>
<div class="">
<div x-show.transition.in="activeType === 'default'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.default('Event has been created.')</code></pre>
</div>
<div x-show.transition.in="activeType === 'success'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('You have achieved your goal 🏆')</code></pre>
</div>
<div x-show.transition.in="activeType === 'info'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.info('Please provide more information.')</code></pre>
</div>
<div x-show.transition.in="activeType === 'warning'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.warning('Warning! This action is irreversible.')</code></pre>
</div>
<div x-show.transition.in="activeType === 'error'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.error('Oops! Something went wrong.')</code></pre>
</div>
</div>
</div>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Usage</h2>
<p class="text-gray-600 text-sm leading-6">You need a <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">ripple.js</span>
to your project <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">root</span>
folder to customize the toastr globally. File name must be <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">ripple.js</span>
and the content should be like below:</p>
<p class="">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-xs leading-relaxed language-javascript">export const RippleConfig = {
animationSpeed: '0.5s',
colorful: true,
duration: 500,
icon: true,
position: 'bottom-right',
progressBar: true,
timeout: 3000,
colors: {
success: {
backgroundColor: '#ECFDF3',
color: '#008A2E',
borderColor: '#D3FDE5',
progressBarColor: '#008A2E',
},
error: {
backgroundColor: '#FFF0F0',
color: '#E60000',
borderColor: '#FFE0E1',
progressBarColor: '#E60000',
},
info: {
backgroundColor: '#F0F8FF',
color: '#0973DC',
borderColor: '#D3E0FD',
progressBarColor: '#0973DC',
},
warning: {
backgroundColor: '#FFFCF0',
color: '#DC7609',
borderColor: '#FDF5D3',
progressBarColor: '#DC7609',
},
default: {
backgroundColor: '#FFFFFF',
color: '#171717',
borderColor: '#EDEDED',
progressBarColor: '#171717',
}
}
};</code></pre>
</p>
</div>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Laravel</h2>
<p class="text-gray-600 text-sm leading-relaxed">To use in laravel based project, you need to include below code in your <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">resources/app.js</span> file.</p>
<div class="">
<div class="">
<p>
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-xs leading-relaxed language-javascript">import RippleNotify from 'ripple-notify';
const ripple = RippleNotify;
window.ripple = ripple;</code></pre>
</p>
</div>
</div>
<p class="text-gray-600 text-sm leading-relaxed mt-5">And then add the below code in your <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">resources/app.css</span> file.</p>
<div class="">
<div class="">
<p>
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-xs leading-relaxed language-javascript">@import "ripple-notify/styles.css";</code></pre>
</p>
</div>
</div>
</div>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">HTML based</h2>
<p class="text-gray-600 text-sm leading-relaxed">For normal <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">html</span> usage, you need to include the <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">styles.css</span> file in your project.</p>
<div class="">
<div class="">
<p>
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-xs leading-relaxed language-html"><link rel="stylesheet" href="node_modules/ripple-notify/styles.css"></code></pre>
</p>
</div>
</div>
<p class="text-gray-600 text-sm leading-relaxed mt-5">Initialize the <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">ripple</span> in your project.</p>
<div class="">
<div class="">
<p>
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-xs leading-relaxed language-javascript"><script type="module">import RippleNotify from './node_modules/ripple-notify/index.js';
const ripple = RippleNotify;
window.ripple = ripple;
</script></code></pre>
</p>
</div>
</div>
</div>
<div x-data="{ activePosition: 'top-left' }" class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Position</h2>
<p class="text-gray-600 text-sm leading-relaxed">You can customize the position of the
toastr. Available options are</p>
<div class="">
<ul class="my-4 flex justify-start items-center gap-5">
<li>
<button @click="activePosition = 'top-left'"
:class="{ 'bg-gray-100': activePosition === 'top-left' }"
onclick="ripple.default('Event has been created.', {position: 'top-left'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Top left
</button>
</li>
<li>
<button @click="activePosition = 'top-center'"
:class="{ 'bg-gray-100': activePosition === 'top-center' }"
onclick="ripple.success('You have achieved your goal 🏆', {position: 'top-center'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Top center
</button>
</li>
<li>
<button @click="activePosition = 'top-right'"
:class="{ 'bg-gray-100': activePosition === 'top-right' }"
onclick="ripple.info('Please provide more information.', {position: 'top-right'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Top right
</button>
</li>
<li>
<button @click="activePosition = 'bottom-left'"
:class="{ 'bg-gray-100': activePosition === 'bottom-left' }"
onclick="ripple.warning('Warning! This action is irreversible.', {position: 'bottom-left'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Bottom left
</button>
</li>
<li>
<button @click="activePosition = 'bottom-center'"
:class="{ 'bg-gray-100': activePosition === 'bottom-center' }"
onclick="ripple.error('Oops! Something went wrong.', {position: 'bottom-center'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Bottom center
</button>
</li>
<li>
<button @click="activePosition = 'bottom-right'"
:class="{ 'bg-gray-100': activePosition === 'bottom-right' }"
onclick="ripple.success('You have achieved your goal 🏆', {position: 'bottom-right'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Bottom right
</button>
</li>
</ul>
</div>
<div class="">
<div x-show.transition.in="activePosition === 'top-left'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.default('Event has been created.', {position: 'top-left'})</code></pre>
</div>
<div x-show.transition.in="activePosition === 'top-center'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('You have achieved your goal 🏆', {position: 'top-center'})</code></pre>
</div>
<div x-show.transition.in="activePosition === 'top-right'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.info('Please provide more information.', {position: 'top-right'})</code></pre>
</div>
<div x-show.transition.in="activePosition === 'bottom-left'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.warning('Warning! This action is irreversible.', {position: 'bottom-left'})</code></pre>
</div>
<div x-show.transition.in="activePosition === 'bottom-center'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.error('Oops! Something went wrong.', {position: 'bottom-center'})</code></pre>
</div>
<div x-show.transition.in="activePosition === 'bottom-right'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('You have achieved your goal 🏆', {position: 'bottom-right'})</code></pre>
</div>
</div>
</div>
<div x-data="{ activeColor: true }" class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Colored</h2>
<p class="text-gray-600 text-sm leading-relaxed">If you want to show the colorful toastr,
you can set it to <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">true</span>.
Default is <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">false</span>.
</p>
<div class="">
<ul class="my-4 flex justify-start items-center gap-5">
<li>
<button @click="activeColor = true"
:class="{ 'bg-gray-100': activeColor === true }"
onclick="ripple.success('You have achieved your goal 🏆', {colorful: true})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Enabled
</button>
</li>
<li>
<button @click="activeColor = false"
:class="{ 'bg-gray-100': activeColor === false }"
onclick="ripple.error('Oops! Something went wrong.', {colorful: false})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Disabled
</button>
</li>
<li>
<button @click="activeColor = 'custom-config'"
:class="{ 'bg-gray-100': activeColor === 'custom-config' }"
onclick="ripple.info('Oops! Something went wrong.')"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Custom config
</button>
</li>
<li>
<button @click="activeColor = 'custom-color'"
:class="{ 'bg-gray-100': activeColor === 'custom-color' }"
onclick="ripple.error('Oops! Something went wrong.', {colorful: true, backgroundColor: '#FFF0F0', color: '#E60000', borderColor: '#FFE0E1'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Custom color
</button>
</li>
</ul>
</div>
<div class="">
<div x-show.transition.in="activeColor === true" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('You have achieved your goal 🏆', {colorful: true})</code></pre>
</div>
<div x-show.transition.in="activeColor === false" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.error('Oops! Something went wrong.', {colorful: false})</code></pre>
</div>
<div x-show.transition.in="activeColor === 'custom-config'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-xs leading-relaxed language-javascript">colorful: false,
colors: {
info: {
backgroundColor: '#ECFDF3',
color: '#008A2E',
borderColor: '#D3FDE5'
},
}</code></pre>
</div>
<div x-show.transition.in="activeColor === 'custom-color'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.error('Oops! Something went wrong.', {colorful: true, backgroundColor: '#FFF0F0', color: '#E60000', borderColor: '#FFE0E1'})</code></pre>
</div>
</div>
</div>
<div x-data="{ activeIcon: true }" class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Icon</h2>
<p class="text-gray-600 text-sm leading-relaxed">If you don't want to show the icon, you can
set it to <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">false</span>.
Default is <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">true</span>.
</p>
<div class="">
<ul class="my-4 flex justify-start items-center gap-5">
<li>
<button @click="activeIcon = true"
:class="{ 'bg-gray-100': activeIcon === true }"
onclick="ripple.success('You have achieved your goal 🏆', {icon: true})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Enabled
</button>
</li>
<li>
<button @click="activeIcon = false"
:class="{ 'bg-gray-100': activeIcon === false }"
onclick="ripple.error('Event has been created.', {icon: false})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Disabled
</button>
</li>
</ul>
</div>
<div class="">
<div x-show.transition.in="activeIcon === true" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('You have achieved your goal 🏆', {icon: true})</code></pre>
</div>
<div x-show.transition.in="activeIcon === false" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.error('Oops! Something went wrong.', {icon: false})</code></pre>
</div>
</div>
</div>
<div x-data="{ progressBar: true }" class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Progress bar</h2>
<p class="text-gray-600 text-sm leading-relaxed">If you don't want to show the icon, you can
set it to <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">false</span>.
Default is <span
class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-5">true</span>.
</p>
<div class="">
<ul class="my-4 flex justify-start items-center gap-5">
<li>
<button @click="progressBar = true"
:class="{ 'bg-gray-100': progressBar === true }"
onclick="ripple.success('You have achieved your goal 🏆', {progressBar: true})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Enabled
</button>
</li>
<li>
<button @click="progressBar = false"
:class="{ 'bg-gray-100': progressBar === false }"
onclick="ripple.error('Event has been created.', {progressBar: false})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Disabled
</button>
</li>
</ul>
</div>
<div class="">
<div x-show.transition.in="progressBar === true" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('You have achieved your goal 🏆', {progressBar: true})</code></pre>
</div>
<div x-show.transition.in="progressBar === false" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.error('Oops! Something went wrong.', {progressBar: false})</code></pre>
</div>
</div>
</div>
<div x-data="{ progressBarColor: 'default' }" class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Progress bar color customization</h2>
<p class="text-gray-600 text-sm leading-relaxed">You can customize the progress bar color.
</p>
<div class="">
<ul class="my-4 flex justify-start items-center gap-5">
<li>
<button @click="progressBarColor = 'default'"
:class="{ 'bg-gray-100': progressBarColor === 'default' }"
onclick="ripple.success('This is default color')"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Default
</button>
</li>
<li>
<button @click="progressBarColor = 'customColor'"
:class="{ 'bg-gray-100': progressBarColor === 'customColor' }"
onclick="ripple.success('Ripple showing with custom progress bar', {progressBarColor: '#43e046'})"
class="bg-gray-50 border border-gray-200 shadow-sm text-gray-800 text-xs font-medium w-24 inline-block py-2 rounded-md text-center">
Custom color
</button>
</li>
</ul>
</div>
<div class="">
<div x-show.transition.in="progressBarColor === 'default'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('This is default color', {progressBar: true})</code></pre>
</div>
<div x-show.transition.in="progressBarColor === 'customColor'" class="code-block">
<pre class="rounded-lg !bg-gray-50 border border-gray-100"><code
class="!text-gray-600 !text-sm leading-relaxed language-bash">ripple.success('Event has been created.', {progressBarColor: '#43e046'})</code></pre>
</div>
</div>
</div>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Available options</h2>
<table class="table-auto w-full mt-2">
<thead>
<tr class="w-full text-gray-800 text-sm font-semibold leading-relaxed">
<th class="border border-gray-200 text-left px-4 py-2.5 w-32">Property</th>
<th class="border border-gray-200 text-left px-4 py-2.5">Description</th>
<th class="border border-gray-200 text-left px-4 py-2.5 w-28">Default</th>
</tr>
</thead>
<tbody class="text-gray-800 text-xs leading-relaxed">
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
types
</td>
<td class="border border-gray-200 text-left px-4 py-3">You can customize the type of toast you want to render
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">default</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">success</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">error</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">info</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">warning</span>
</td>
<td class="border border-gray-200 text-left px-4 py-3">
-
</td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
position
</td>
<td class="border border-gray-200 text-left px-4 py-3">You can customize the position of the toastr.
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">top-left</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">top-center</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">top-right</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">bottom-left</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">bottom-center</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">bottom-right</span>
</td>
<td class="border border-gray-200 text-left px-4 py-3"><span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">bottom-right</span></td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
colored
</td>
<td class="border border-gray-200 text-left px-4 py-3">If you want to show the colorful toastr, you can set it to <span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">true</span></td>
<td class="border border-gray-200 text-left px-4 py-3"><span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">false</span></td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
icon
</td>
<td class="border border-gray-200 text-left px-4 py-3">Icon displayed in start of toast's text.
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">true</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">false</span>
</td>
<td class="border border-gray-200 text-left px-4 py-3"><span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">true</span></td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
progressBar
</td>
<td class="border border-gray-200 text-left px-4 py-3">Progressbar displayed relatively.
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">true</span>,
<span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">false</span>
</td>
<td class="border border-gray-200 text-left px-4 py-3"><span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">true</span></td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
progressBarColor
</td>
<td class="border border-gray-200 text-left px-4 py-3">You can customize the progress bar color.</td>
<td class="border border-gray-200 text-left px-4 py-3">-</td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
timeout
</td>
<td class="border border-gray-200 text-left px-4 py-3">Represents the time in milliseconds that the notification will be displayed.</td>
<td class="border border-gray-200 text-left px-4 py-3">3000ms</td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
animationSpeed
</td>
<td class="border border-gray-200 text-left px-4 py-3">Animation speed of the notification</td>
<td class="border border-gray-200 text-left px-4 py-3">0.5s</td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
duration
</td>
<td class="border border-gray-200 text-left px-4 py-3">It will disappear after the duration.</td>
<td class="border border-gray-200 text-left px-4 py-3">500ms</td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
onHover
</td>
<td class="border border-gray-200 text-left px-4 py-3">When the <span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">mouse enters</span> hover, it will stop, on the <span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">mouse leaves</span> it will start again.</td>
<td class="border border-gray-200 text-left px-4 py-3">-</td>
</tr>
<tr class="border border-gray-200 even:bg-transparent odd:bg-gray-100">
<td class="border border-gray-200 text-left px-4 py-3">
onClick
</td>
<td class="border border-gray-200 text-left px-4 py-3"><span class="font-medium italic bg-gray-200 px-1 rounded py-0 inline-block leading-4">On click</span> on the toaster, and it will be removed immediately.</td>
<td class="border border-gray-200 text-left px-4 py-3">-</td>
</tr>
</tbody>
</table>
</div>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Release notes</h2>
<p class="text-gray-600 text-sm leading-relaxed">You can find the release note for the latest release <a href="https://www.npmjs.com/package/ripple-notify?activeTab=versions" target="_blank" class="text-blue-600">here</a>.</p>
</div>
<div class="">
<h2 class="text-gray-800 text-base font-bold leading-relaxed">Contributors</h2>
<p class="text-gray-600 text-sm leading-relaxed">Find me on github <a href="https://github.com/MdRubelRana" target="_blank" class="text-blue-600">@Md Rubel Rana</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="container mx-auto pb-10">
<div class="flex justify-center items-center py-5">
<div class="">
<div class="mb-5">
<ul class="flex justify-center items-center gap-4">
<li>
<a href="https://codiify.com/" target="_blank">
<i class="fa-solid fa-earth-americas text-gray-600 hover:bg-gray-100 text-sm border w-7 h-7 flex justify-center items-center rounded-full"></i>
</a>
</li>
<li>
<a href="https://x.com/codiify_ui" target="_blank">
<i class="fa-brands fa-x-twitter text-gray-600 hover:bg-gray-100 text-sm border w-7 h-7 flex justify-center items-center rounded-full"></i>
</a>
</li>
<li>
<a href="https://www.linkedin.com/in/ranarubel/" target="_blank">
<i class="fa-brands fa-linkedin-in text-gray-600 hover:bg-gray-100 text-sm border w-7 h-7 flex justify-center items-center rounded-full"></i>
</a>
</li>
</ul>
</div>
<p class="text-gray-600 text-sm leading-relaxed">© 2024 <a href="https://codiify.com/" target="_blank"
class="font-semibold hover:opacity-80 underline underline-offset-2">Codiify</a>
. All rights reserved.</p>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/prismjs/prism.js"></script>
<script type="module">
import RippleNotify from './node_modules/ripple-notify/index.js';
const ripple = RippleNotify;
window.ripple = ripple;
</script>
</body>
</html>