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

noty-noty

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noty-noty

Beautiful customizable notifications with no jQuery depencies

  • 0.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Noty, A customizable Javascript notification library

Noty is a small javascript notification library that doesn't depend on jQuery. It can easily be used in your client side applications regardless of the framework

Installation

Add the package npm package into your project directory like so:

$ yarn add noty-noty

Usage

Just use it by importing the library

import Noty from 'noty-noty';

const ExampleComponent = (props) => {

  const handleClick = () => {
    Noty({
      type: 'primary',
      message: 'Hi there, Welcome back to our app',
    });
  };

  return (
    <button onClick={handleClick}>Click me!</button>
  );
}

Options

Below shows a list of options you can pass to Noty

OptionDescriptionExample Values
typeSets the type of alert to show it. (default: primary)primary, success, info, danger
iconSets an icon for the alert. You can pass it any icon classes you have configured (default: "")fa fa-info-circle, glyphicon glyphicon-envelope
htmlOption to pass html content. When option is set, title and message options are not used (default: null)<h3>Example</h3>
titleSets a heading for the alert (default: "")-
messageSets a message body (default: "")-
closeBtnShows a close button that allows users to close alert (default: true)-
timerSet timer delay to show alert before disappearing (default: 500)-
onShowSet handler to run right before alert is shown-
onShownSet handler to run after alert is shown-
onHideSet handler function to run right before it is hidden-
onHiddenSet handler function to run after it is hidden-

TODO

  • option for page banner alert
  • option for panel level alert

Contributing

Feel free to create an issue or pull request if there's something you wish to be added to it

Keywords

FAQs

Package last updated on 04 Jul 2017

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