noty

Installation

Include lib/noty.css & lib/noty.js or use Bower, NPM, Yarn or Composer

<link href="lib/noty.css" rel="stylesheet">
<script src="lib/noty.js" type="text/javascript"></script>

NOTY v3 is NOT dependent to jQuery anymore.

Install via Bower

$ bower install noty

Install via NPM

$ npm install noty

Install via Yarn

$ yarn add noty

Install via Composer

$ composer require needim/noty

For Laravel

Add to resources/assets/sass/app.scss

@import "~noty/src/noty.scss";
@import "~noty/src/themes/mint.scss";

Add to resources/assets/js/bootstrap.js

window.Noty = require('noty');

Then run yarn dev or npm run dev

Usage: Creating a Notification

new Noty({
    ...
    text: 'Some notification text',
    ...
}).show();

ES6 import & Require Usages

import Noty from 'noty';
new Noty({
    ...
    text: 'Some notification text',
    ...
}).show();

const Noty = require('noty');
new Noty({
    ...
    text: 'Some notification text',
    ...
}).show();

RequireJS

While defining path for Noty you should write "Noty" with capital letter of N.

requirejs.config({
	paths: {
		"Noty": "libs/noty.min",
    ...
	},
    ...