Socket
Socket
Sign inDemoInstall

toast-emoji

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    toast-emoji

Toast emoji is a toast web component, that randomly adds an emoji { 😁 } to your toast message.


Version published
Weekly downloads
7
decreased by-70.83%
Maintainers
1
Install size
80.3 kB
Created
Weekly downloads
 

Readme

Source

<toast-emoji>

NPM

Toast emoji is a toast web component, that randomly adds an emoji { 😁 } to your toast message.

How to Use

import "toast-emoji";

Or

import * from "toast-emoji"

Or

<script src="https://cdn.jsdelivr.net/npm/toast-emoji@0.0.1/src/index.min.js"></script>

Example

<toast-emoji
  type="sucess"
  message="This is a demo"
  position="bottom-left"
></toast-emoji>
See demo

Attributes

  • All attributes are optional
AttributeTypeDescriptionDefault
typeStringThe type of toast - can be (success, error, warn, light)""
messageStringThe message of toastHey there!
positionStringThe position of toast on page - can be (top-left, top-right, top-center, left, right, center, bottom-left, bottom-right, bottom-center)postion-center
hiddenBooleanThe hiding status of the toast.false
timeoutIntegerThe time before toast get hidden in millisecons. when empty - (Always visible until user closes toast).""

Events

  • closed - event is emitted whenever toast get close by user action or by timeout
var toast = document.createElement("toast-emoji");

toast.addEventListener("closed", function() {
  alert();
});

Screenshots

  • Dark mode - default toast-emoji
  • Light mode toast-emoji
  • Error mode toast-emoji

Keywords

FAQs

Last updated on 05 Dec 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc