Socket
Socket
Sign inDemoInstall

crostini

Package Overview
Dependencies
500
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    crostini

### A super simple toast notification


Version published
Weekly downloads
8
decreased by-11.11%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Crostini

A super simple toast notification

npm install crostini
import crostini from 'crostini';

// show a regular notification
crostini("Document successfully archived");

// show a notification with default error styles
crostini("Error: Can't save data", {type: "error"});

// overwrite default styles and behavior
crostini("Successfully signed up! 🎉", { 
  slideInFromTop: true, // slide in from top instead of bottom
  backgroundColor: "#4f46e5", // set a custom background color
  textColor: "#fff", // set a custom text color
  customCss: "border: 3px solid #fff; border-radius: 8px;" // overwrite the default css (on the top-level .crostini element only)
})

Or simply:

<script src="https://cdn.jsdelivr.net/npm/crostini@1.4.0/dist/crostini.umd.js"></script>

Original Project

This library is based on a Pen by Pierre Smith: https://codepen.io/kipp0/pen/pPNrrj

FAQs

Last updated on 20 May 2022

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