Skip to content

rishabhgupta/svelte-toastify

Repository files navigation

Svelte Toastify

Under development DO NOT USE

Toast Library for svelte

Setup

Import toast and ToastContainer component

import { toast, ToastContainer } from "svelte-toastify";

Configure

toast.configure({
    position: "top-right"
});

Add toast container in App.svelte

<main>
    <div>Your App </div>
    <ToastContainer />
</main>

Usage

Import toast in you component

import { toast } from "svelte-toastify";

To Fire a toast

toast.success("This is a success message");
    
toast.error("This is an error message");

toast.info("This is an info message");

toast.warn("This is an warning message");

About

Toast Library for Svelte

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published