Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zingzy/fluenttoast

A simple, modern and smart toast-notification library for the web ⚡
https://github.com/zingzy/fluenttoast

css fluent-design javascript notifications toast-notifications

Last synced: 20 days ago
JSON representation

A simple, modern and smart toast-notification library for the web ⚡

Awesome Lists containing this project

README

        

# fluentToast

A simple, modern and smart toast-notification library for the web.

## ✨ Features

- Simple and easy to use
- Customizable
- Toast Queueing
- Custom Duration
- Fluent Design
- Sound alert
- Different types of toasts
- No dependencies
- Lightweight

## 🔧 Installation

```html

```

## 🏗️ Usage

```javascript
fluentToast("Toast1", "Hello this is a test!", 10, "warning");
```

## ⚙️ Parameters


Parameter
Description
Default


Id
Unique Id of the Toast
""


text
The message of the toast
""


duration
The duration of the toast in seconds
10


type
The type of the toast. Can be "success", "warning", "error" or "info"
"info"


soundAlert
Whether to play a sound when the toast is shown
true

### Why is Id important?

The `Id` parementer is important as it acts as a unique identifier for the toast. It also acts as a notification spam filter. If a toast with the same `Id` is already present, the new toast will replace it and the duration will be reset.

## ⛔ Limitations

- The library is not yet fully responsive
- The library is not yet fully customizable
- The Toast Notification sound does not play if the user have not interacted with the page at least once
- The Toast Notification does not have a closing animation

## 🤩 Upcoming Features

- Notification Actions
- More customization options
- More types of toasts
- Persistant Toats
- Custom sound alerts
- Toast Icon
- Closing Animation

## 🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to [open a PR](https://github.com/Zingzy/fluentToast/pulls) or [submit an issue](https://github.com/Zingzy/fluentToast/issues/new).

You may also join the [Discord Server](https://spoo.me/discord) to discuss new features, issues and more.

---


© zingzy . 2024

All Rights Reserved