Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@windui/snackbar

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@windui/snackbar

WindUI | Snackbar Package | by Swôth

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-64.71%
Maintainers
1
Weekly downloads
 
Created
Source

@windui/snackbar

Developed with ❤️ by Swôth

Installation

npm i @windui/snackbar --save
yarn add @windui/snackbar

CDN

<script src="https://cdn.jsdelivr.net/npm/@windui/snackbar@1.0.0/windui.snackbar.min.js"></script>

React Example

import Snackbar from "@windui/snackbar";

export default function Index() {
    const trigger = () => {
        const hello = new Snackbar({
            options: {
                duration: 3000,
                speed: 500, // animation speed
                type: "info", // snackbar types: info, success, error, warning
                align: "right", // right or left
                position: "bottom" // top or bottom
            },
            title: "Hello World!",
            message: "No post on Sundays!"
        });

        // show snackbar
        hello.show();

        // hide before timeout
        // hello.hide();
    };

    return (
        <button onClick={trigger}>
            Show Snackbar!
        </button>
    );
};

DOM Example

<!DOCTYPE html>
<html>
    <head>
        <title>@windui/snackbar</title>
    </head>
    <body>
        <button onclick="trigger()">
            Show Snackbar!
        </button>
        <script src="https://cdn.jsdelivr.net/npm/@windui/snackbar@1.0.0/windui.snackbar.min.js"></script>
        <script>
            const trigger = () => {
                const hello = new Snackbar({
                    options: {
                        duration: 3000,
                        speed: 500, // animation speed
                        type: "info", // snackbar types: info, success, error, warning
                        align: "right", // right or left
                        position: "bottom" // top or bottom
                    },
                    title: "Hello World!",
                    message: "No post on Sundays!"
                });

                // show snackbar
                hello.show();

                // hide before timeout
                // hello.hide();
            };
        </script>
    </body>
</html>

Keywords

FAQs

Package last updated on 02 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc