All Projects β†’ simple-notify β†’ simple-notify

simple-notify / simple-notify

Licence: MIT license
Pure javascript toast notifications.

Programming Languages

CSS
56736 projects
typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to simple-notify

RTL-Toast
Android Toast For RTL Applications
Stars: ✭ 16 (-85.19%)
Mutual labels:  toast, toast-message, toast-notifications
JDToaster
🍞 Toasty iOS alerts
Stars: ✭ 25 (-76.85%)
Mutual labels:  toast, toast-message, toast-notifications
bs5-utils
A JavaScript utility package for Bootstrap 5 components.
Stars: ✭ 26 (-75.93%)
Mutual labels:  toast, toast-message, toast-notifications
ComposableSweetToast
Jetpack Compose, Custom Toast, Solid Principles, Kotlin
Stars: ✭ 60 (-44.44%)
Mutual labels:  toast, toast-message
iOSUtilitiesSource
IOS Utilities Library for Swift
Stars: ✭ 46 (-57.41%)
Mutual labels:  toast, toast-message
SimpleToast
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or MacOS applications in SwiftUI. Because of the flexibility to show any content it is also possible to use the library for showing simple modals.
Stars: ✭ 131 (+21.3%)
Mutual labels:  toast, toast-notifications
neodigm55
An eclectic low-code vanilla JavaScript UX micro-library for those that defiantly think for themselves.
Stars: ✭ 14 (-87.04%)
Mutual labels:  toast, toast-notifications
SteamAchievementNotifier
Steam Achievement Notifier is an Electron application that shows a customisable notification when you unlock any Steam Achievement! It uses the Steam Web API to track achievement stats in real time, and displays an achievement summary within the notification.
Stars: ✭ 77 (-28.7%)
Mutual labels:  toast, toast-notifications
Loafjet
πŸš€ Loafjet is a lightweight custom framework used to add Loafs, Dash Board, Popup Card, and Loading indicator in your Swift project
Stars: ✭ 63 (-41.67%)
Mutual labels:  toast, toast-message
react-toast
Minimal toast notifications for React.
Stars: ✭ 47 (-56.48%)
Mutual labels:  toast, toast-notifications
php-flasher
πŸ”” Flasher is a powerful and flexible flash notifications system for PHP, Laravel, Symfony
Stars: ✭ 68 (-37.04%)
Mutual labels:  toast, notify
toaststrap
A simple, lightweight JavaScript library for showing Bootstrap 5 toast popups.
Stars: ✭ 16 (-85.19%)
Mutual labels:  toast, toast-notifications
Notistack
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
Stars: ✭ 2,562 (+2272.22%)
Mutual labels:  toast, toast-notifications
tall-toasts
A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS πŸ”₯πŸš€
Stars: ✭ 296 (+174.07%)
Mutual labels:  toast, toast-notifications
v-tostini
Toast plugin for Vue.js 2.x
Stars: ✭ 12 (-88.89%)
Mutual labels:  toast, toast-notifications
Toastutils
Android εεΈζ‘†ζžΆοΌŒδΈ“ζ²» Toast ε„η§η–‘ιšΎζ‚η—‡
Stars: ✭ 2,087 (+1832.41%)
Mutual labels:  toast, toast-notifications
React Toast Notifications
🍞 A toast notification system for react
Stars: ✭ 2,103 (+1847.22%)
Mutual labels:  toast, toast-notifications
React Notify Toast
Toast notifications for React.js
Stars: ✭ 176 (+62.96%)
Mutual labels:  toast
Toast Swift
Toast view using swift.
Stars: ✭ 228 (+111.11%)
Mutual labels:  toast
Angular Notifier
A well designed, fully animated, highly customizable, and easy-to-use notification library for your Angular application.
Stars: ✭ 175 (+62.04%)
Mutual labels:  toast

Simple Notify

Simple Notify is a pure Javascript library to show nice and customizable alert notifications.

Live Demo

Install

npm i simple-notify
import Notify from 'simple-notify'
import 'simple-notify/dist/simple-notify.min.css'

Include

<!-- CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/simple-notify.min.css" />

<!-- JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/simple-notify.min.js"></script>

Parameters

Parameter Type Values Default
status String 'error', 'warning', 'success' null
title String null
text String You can send any type of html. null
customIcon String You can send any type of html. null
customClass String null
speed Number transition-duration in milliseconds. 300
effect String 'fade', 'slide' 'fade'
showIcon Boolean true
showCloseButton Boolean true
autoclose Boolean false
autotimeout (valid only with autoclose) Number 3000
gap (margin between notifications) Number 20
distance (distance to edges) Number 20
type (just for design) Number 1, 2, 3 1
position String Combine x and y position. 'left', 'right', 'top', 'bottom', 'x-center', 'y-center' or use only 'center' to center both x and y 'right top'

All parameters are optional but you must specify 'title' or 'text' at least.

Functions

Function Description
close() You can close the notification manually using the close function.

How to use

Just create a new instance, notification will be sent immediately. Full example:

function pushNotify() {
  new Notify({
    status: 'success',
    title: 'Notify Title',
    text: 'Notify text lorem ipsum',
    effect: 'fade',
    speed: 300,
    customClass: null,
    customIcon: null,
    showIcon: true,
    showCloseButton: true,
    autoclose: false,
    autotimeout: 3000,
    gap: 20,
    distance: 20,
    type: 1,
    position: 'right top'
  })
}

Close manually:

let myNotify

function pushNotify() {
  myNotify = new Notify({
    status: 'success',
    title: 'Notify Title',
    text: 'notify text',
    effect: 'slide',
    type: 3
  })
}

function close() {
  myNotify.close()
}

CSS

The colors and some sizes can be customized easily using CSS variables. You can overwrite them in .notify or your custom class, or change it directly in the css file.

.notify {
  /* defaults */
  --notify-error: #eb5757;
  --notify-success: #6fcf97;
  --notify-warning: #f2c94c;
  --notify-gray: #333333;
  --notify-gray-2: #4d4d4d;
  --notify-gray-3: #828282;
  --notify-white: #fff;
  --notify-white-2: rgba(255, 255, 255, 0.8);
  --notify-padding: 0.75rem;
  --notify-icon-size: 32px;
  --notify-close-icon-size: 16px;
}

Do you need another feature?

If you want any feature, just open an issue and make sure I'll add it ASAP. Also feel free to send PR, contributions are welcomed.

Credits

Designed by Prabesh Shakya

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].