# notti

> Don't make me think - Dead simple user notification.

Latest version **0.0.7** (published 2017-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install notti
pnpm add notti
yarn add notti
bun add notti
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2017-03-13 |
| First published | 2017-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Luis Vinicius |
| Maintainers | luisvinicius167 |

## Links

- npm: https://www.npmjs.com/package/notti
- npm.io page: https://npm.io/package/notti

## Dependencies (7)

- [grunt](https://npm.io/package/grunt.md) ^1.0.1
- [time-grunt](https://npm.io/package/time-grunt.md) ^1.4.0
- [grunt-babel](https://npm.io/package/grunt-babel.md) ^6.0.0
- [grunt-contrib-watch](https://npm.io/package/grunt-contrib-watch.md) ^1.0.0
- [grunt-contrib-uglify](https://npm.io/package/grunt-contrib-uglify.md) ^2.0.0
- [babel-preset-es2015-script](https://npm.io/package/babel-preset-es2015-script.md) ^1.1.0
- [babel-plugin-transform-object-assign](https://npm.io/package/babel-plugin-transform-object-assign.md) ^6.22.0

## Recent versions

- 0.0.7 (latest) — 2017-03-13
- 0.0.6 — 2017-02-06
- 0.0.5 — 2017-02-05
- 0.0.4 — 2017-02-05
- 0.0.3 — 2017-02-05
- 0.0.2 — 2017-02-05
- 0.0.1 — 2017-02-05

## README

# notti

[![npm package](https://img.shields.io/badge/npm-v0.0.7-lightgray.svg)](https://www.npmjs.com/package/notti)

> Don't make me think - Dead simple user notification.

---

<p align="center">
  <img src="https://cdn.rawgit.com/luisvinicius167/notti/master/img/notti.gif" width="400"/>
</p>

[notti Website ➞](https://notti.surge.sh/)

## Why should you use notti?
 * Tiny size: 2.2kb
 * No external CSS dependency
 * No jQuery dependency
 * Fully customizable

#### Install

Npm: `npm install notti` </br>
CDN: `https://unpkg.com/notti@0.0.7`


#### The Gist:

```javascript
import { notti } from 'notti';

notti('Hello User!');

notti({
  // HTML Element
  message: '<strong>Hello!</stong> User',
  isHTML: true,
  style : {
    backgroundColor: '#333',
    color:'#fff',
    bottom: '10px',
    right: '10px'
  },
  onHide: () => {
    console.log('Awesome notti.js!')
  }
});
```

### API

```javascript
/**
 * @name notti
 * type Function
 * @description Show an notification
 * @param {String || Object } The message or customizable Object
 */

 notti('Hi Folks!');
 
 // or
 const customizable = {
   message: 'Hi folks',
   style: {
     backgroundColor: '#333',
     color: '#fff',
     top: '10px',
     right: '10px',
   }
 }

 notti(customizable);
```


Customizable params

```javascript
/**
  * @param {String} message The notification message
  * @param {Object} style Customizable style
  * @param {Boolean} autoHide Auto hide the notification box
  * @param {Boolean} hideOnClick Hide the notification when clicked
  * @param {Boolean} isHTML If the message string contains HTML Element
  * @param {Integer} delay The notification hide delay time
  * @param {Function} onHide The Function that will be called when the notification disappear
  **/

  const config = {
    // required
    message: 'Hi Folks' || '<p>Hi <span class="username">Folks</span></p>',
    // just true if your message contains HTML Element
    isHTML: false, //default
    //optional
    style:  {}, //default
    //optional
    autoHide:  true, //default
    //optional
    hideOnClick: true, //default
    //optional
    delay:  2000, //default
    //optional
    onHide: ()=>{console.log('Awesome notti.js')}
  }
```

---
_Source: https://npm.io/package/notti · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
