beyonk-adventures / Svelte Notifications
Licence: mit
Svelte toast notifications component that can be used in any JS application
Stars: ✭ 146
Projects that are alternatives of or similar to Svelte Notifications
Ftindicator
A light wight UI package contains local notification, progress HUD, toast, with blur effect, elegant API and themes support.
Stars: ✭ 292 (+100%)
Mutual labels: notifications, toast
Gsmessages
A simple style messages/notifications, in Swift.
Stars: ✭ 595 (+307.53%)
Mutual labels: notifications, toast
php-flasher
🔔 Flasher is a powerful and flexible flash notifications system for PHP, Laravel, Symfony
Stars: ✭ 68 (-53.42%)
Mutual labels: notifications, toast
Laravel Notify
Flexible Flash notifications for Laravel
Stars: ✭ 787 (+439.04%)
Mutual labels: notifications, toast
svelte-google-analytics
Google Analytics component for Svelte
Stars: ✭ 41 (-71.92%)
Mutual labels: svelte, vanillajs
Toastify Js
Pure JavaScript library for better notification messages
Stars: ✭ 570 (+290.41%)
Mutual labels: notifications, toast
Sentinel
👀 Native notifications for League of Legends
Stars: ✭ 38 (-73.97%)
Mutual labels: notifications, toast
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+4126.03%)
Mutual labels: notifications, toast
ngx-toasta
Simple and clean Toast notification library for AngularX (Angular2 and beyond)
Stars: ✭ 20 (-86.3%)
Mutual labels: notifications, toast
Reapop
📮 A simple and customizable React notifications system
Stars: ✭ 1,155 (+691.1%)
Mutual labels: notifications, toast
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 (+102.74%)
Mutual labels: notifications, toast
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (-32.88%)
Mutual labels: notifications, toast
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 (-47.26%)
Mutual labels: notifications, toast
Cogo Toast
Beautiful, Zero Configuration, Toast Messages for React. Only ~ 4kb gzip, with styles and icons
Stars: ✭ 557 (+281.51%)
Mutual labels: notifications, toast
Toasted Notes
simple, flexible toast notifications for react
Stars: ✭ 241 (+65.07%)
Mutual labels: notifications, toast
vue-dk-toast
Lightweight toast-notification plugin for Vue 3 🍞
Stars: ✭ 23 (-84.25%)
Mutual labels: notifications, toast
Vue Toastification
Vue notifications made easy!
Stars: ✭ 747 (+411.64%)
Mutual labels: notifications, toast
Burnttoast
Module for creating and displaying Toast Notifications on Microsoft Windows 10.
Stars: ✭ 796 (+445.21%)
Mutual labels: notifications, toast
Svelte Notifications
Svelte Notifications component
- v3 compatible
- uses stores for completely hassle free operation
Demo
A Demo of this component is available.
Usage
npm i -D @beyonk/svelte-notifications
<NotificationDisplay />
<button on:click={someFunction}>Show message</button>
<script>
import { NotificationDisplay, notifier } from '@beyonk/svelte-notifications'
function someFunction () {
notifier.success('Notifications work!')
}
</script>
Notification types
You can call multiple types of notification:
notifier.show('danger', message, displayTimeMs)
notifier.danger(message, displayTimeMs),
notifier.warning(message, displayTimeMs),
notifier.info(message, displayTimeMs),
notifier.success(message, displayTimeMs)
Notification themes
You can customise the themes:
<NotificationDisplay {themes} />
<button on:click={someFunction}>Show message</button>
<script>
import { NotificationDisplay, notifier } from '@beyonk/svelte-notifications'
let themes = { // These are the defaults
danger: '#bb2124',
success: '#22bb33',
warning: '#f0ad4e',
info: '#5bc0de',
default: '#aaaaaa' // relates to simply '.show()'
}
function someFunction () {
notifier.success('Notifications work!')
}
</script>
Custom types
<NotificationDisplay {themes} />
<button on:click={someFunction}>Show message</button>
<script>
import { NotificationDisplay, notifier } from '@beyonk/svelte-notifications'
let themes = {
myColour: '#ff00bb'
}
function someFunction () {
notifier.send('myColour', 'Notifications work!')
}
</script>
Timeouts
You can set a default timeout:
<NotificationDisplay {timeout} />
<button on:click={someFunction}>Show message</button>
<script>
import { NotificationDisplay, notifier } from '@beyonk/svelte-notifications'
let timeout = 3000 // The default
function someFunction () {
notifier.success('Notifications work!')
}
</script>
Custom timeout:
You can set a timeout per message
<NotificationDisplay />
<button on:click={someFunction}>Show message</button>
<script>
import { NotificationDisplay, notifier } from '@beyonk/svelte-notifications'
function someFunction () {
notifier.success('Notifications work!', 5000) // built in theme
notifier.send('custom-theme', 'Notifications work!', 5000) // custom theme
}
</script>
Credits
- Original code by Antony Jones
- Animation and performance improvements by jg.
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].