svelte-fire-toast
v0.0.4
Published
<a href="https://svelte-fire-toast.surge.sh"><img alt="svelte-fire-toast - Try it out" src="https://raw.githubusercontent.com/ankurrsinghal/svelte-fire-toast/main/src/routes/assets/header.png"/></a>
Downloads
2
Readme
Features
- 🔥 Hot by default
- 🔩 Easily Customizable
- ⏳ Promise API - Automatic loader from a promise
- 🕊 Lightweight - less than 5kb including styles
- ✅ Accessible
Installation
With yarn
yarn add svelte-fire-toast
With NPM
npm install svelte-fire-toast
Getting Started
Add the Toaster to your app first (entry point +layout.svelte). It will take care of rendering all notifications emitted. Now you can trigger toast()
or use:fireAction
from anywhere!
<script>
import { Toaster, toastAction } from 'svelte-fire-toast';
</script>
<Toaster />
<button use:toastAction={'Toasted!'}> Fire </button>
Documentation
Find the full API reference on official documentation.