# snachejs

> A minimalist, intuitive javascript base notification library

Latest version **1.0.6** (published 2021-10-30) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-10-30 |
| First published | 2021-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | benrobo |
| Maintainers | benrobo |
| Keywords | javascript, snackbar, toast, notification |

## Links

- npm: https://www.npmjs.com/package/snachejs
- Repository: https://github.com/Benrobo/Snache-js
- Homepage: https://github.com/Benrobo/Snache-js#readme
- Issues: https://github.com/Benrobo/Snache-js/issues
- npm.io page: https://npm.io/package/snachejs

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2021-10-30
- 1.0.4 — 2021-10-30
- 1.0.3 — 2021-10-30
- 1.0.2 — 2021-10-30
- 1.0.1 — 2021-10-30
- 1.0.0 — 2021-10-30

## README

<p align="center">
<img src="https://raw.githubusercontent.com/Benrobo/Snache-js/main/lib/img/logo.png">
</p>

### Snache-js
### 🎉 A minimalist , intuitive javascript based notification toast library.

### ✔ Getting Started

Installing Snackbrr is as easy as...

```html
<script type="text/javascript" src="https://unpkg.com/snachejs@1.0.6/lib/js/snache.js"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/snachejs@1.0.6/lib/css/snache.css" />
```

### 💎 Initializing Snackbrr

Snache-js can be initialize by creating an instance of snackbrr and calling the <code>init</code> method on the instance

```html
<script>
  new SnackBar(<configs>).init()
</script>
```

### 👌 Configuring Snache-js

Snache-js requires a config parameter. the below code shows you how to configure Snache-js..

```javascript

// initialize snackbar

let snackbar = new SnackBar({
  showIcon: `<Boolean>` // If you wanna show a icon, make this true orderwise false,
  iconName: `<string>` //Snache-js uses fontawesome icons by default,just provide the fontawesome-icon names,
  snackbarText: `<String>`, //The Snache-js text,
  snackbarTextColor: `<String>` // the color of the snackbar text,
  snackbarBg: `<String | color names>` //change the snackbar background,
  iconColor: `<String>`, //snackbar icon color (red, #0000, rgb(0,255,0)),
  visibility: `<boolean>`, //true | false, this would hide the Snache-js element when turned true,
  actionText: `<String>`, //the action element inner text for eg Button,
  action: `<Boolean>`, // If you wanna show a action button, make this true orderwise false,
  handler: () => {
    // your handler functon here
    document.querySelector(".snackbar").style.display = "none";
  },
})

snackbar.show();
```

❤ And that it, Snache-js is ready to be used.

<a href="https://snache.netlify.app/demo/demo.html">Live Demo </a>

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