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

toastr

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toastr

ToastrJS is a JavaScript library for Gnome / Growl type non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.

  • 2.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
decreased by-79.06%
Maintainers
1
Weekly downloads
 
Created

What is toastr?

Toastr is a simple JavaScript library for non-blocking notifications. It is designed to be easy to use and customize, providing a way to display notifications to users in a clean and unobtrusive manner.

What are toastr's main functionalities?

Basic Notification

Displays a basic success notification with the message 'Hello, world!'.

toastr.success('Hello, world!')

Custom Notification Types

Displays different types of notifications: error, info, and warning.

toastr.error('Something went wrong!');
toastr.info('Here is some information.');
toastr.warning('This is a warning.');

Custom Options

Shows how to customize various options for the notifications, such as enabling a close button, setting the position, and configuring the display duration.

toastr.options = {
  'closeButton': true,
  'debug': false,
  'newestOnTop': false,
  'progressBar': true,
  'positionClass': 'toast-top-right',
  'preventDuplicates': false,
  'onclick': null,
  'showDuration': '300',
  'hideDuration': '1000',
  'timeOut': '5000',
  'extendedTimeOut': '1000',
  'showEasing': 'swing',
  'hideEasing': 'linear',
  'showMethod': 'fadeIn',
  'hideMethod': 'fadeOut'
};
toastr.success('Settings applied!');

Clear Notifications

Clears all currently displayed notifications.

toastr.clear();

Other packages similar to toastr

Keywords

FAQs

Package last updated on 24 Jul 2014

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