svelte-toastify

0.0.27 • Public • Published

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");

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.27
    8
    • latest

Version History

Package Sidebar

Install

npm i svelte-toastify

Weekly Downloads

8

Version

0.0.27

License

none

Unpacked Size

107 kB

Total Files

6

Last publish

Collaborators

  • rishabhgupta293