New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

toastwind

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toastwind

0.0.43
latest
Source
npm
Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

Toastwind!

Toastwind is tiny library to show toast on your website.

1. Installation

npm i toastwind

2. Import Project

import Toast from "toastwind"
import "toastwind/dist/style.css"

3. Usage

Toast.show("Success, Data saved!")

4. Option
you can customize toast using option parameter

Toast.show("Error, Data not found",
{
    timeout : 3000,
    status : 'error', // success | error
    position : 'top right', // top | bottom | left | right
    darkMode : false // true | false
})

5. Demo
Live Demo: Codepen


6. CDN Usage

   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastwind/dist/style.css">
    <script src="https://cdn.jsdelivr.net/npm/toastwind"></script>
    
    <script>
        Toast.show("Success, Data saved!")
    </script>
    

7. Methods

method namedescription
show(text : string, option?)show toast
setDefault(option?)set default of option

Thank You

This library built using vite, tailwind css, flowbite component and svelte.

Keywords

tailwind

FAQs

Package last updated on 10 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts