# @hangar42/ngx-toast-it

> ngxToastIt is a simple and lightweight Angular module providing Toasts for your application. Purely written in Angular 8 and designed by hand.

Latest version **1.3.1** (published 2019-09-26) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @hangar42/ngx-toast-it
pnpm add @hangar42/ngx-toast-it
yarn add @hangar42/ngx-toast-it
bun add @hangar42/ngx-toast-it
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2019-09-26 |
| First published | 2019-09-13 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 204.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dennis Rösner |
| Maintainers | hangar42 |

## Links

- npm: https://www.npmjs.com/package/@hangar42/ngx-toast-it
- Repository: https://github.com/Hangar42-de/ngx-toast-it
- Homepage: https://hangar42.de
- Issues: https://github.com/Hangar42-de/ngx-toast-it/issues
- npm.io page: https://npm.io/package/@hangar42/ngx-toast-it

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 1.3.1 (latest) — 2019-09-26
- 1.2.1 — 2019-09-15
- 1.2.0 — 2019-09-14
- 1.1.0 — 2019-09-14
- 1.0.0 — 2019-09-13
- 0.9.0 — 2019-09-13

## README

# ngxToastIt

ngxToastIt is a simple and lightweight Angular module providing Toasts for your application.
Purely written in Angular 8 and designed by hand.

**Just have a look at the [Demo](https://hangar42-de.github.io/ngx-toast-it/)**

![toast examples](https://github.com/Hangar42-de/ngx-toast-it/blob/master/src/assets/toast-preview.png)

## Installation

##### Install via [NPM](http://www.npmjs.org):
  ```bash
  npm install @hangar42/ngx-toast-it
  ```
  or manually [download](https://github.com/Hangar42-de/ngx-toast-it/archive/master.zip) it.

## Usage

##### 1. Include ngxToastIt as a dependency in your desired module:
  ```javascript
  import {ToastItModule} from 'ngx-toast-it';
  ...
  imports: [
    ToastItModule,
    ...
   ]
  ```

##### 2. Inject ToastItService in any class of the module:
  ```javascript
  constructor(private toastItService: ToastItService){}
  ```

##### 3. (Optional) Setup Config
 ```javascript
  import {ToastConfig, ToastPosition} from 'ngx-toast-it';
  ...
  public toastConfig: ToastConfig = {
      position?: ToastPosition.topRight,
      groupingThreshold?: 5,
      progressBarEnabled?: true
  };
  
  public someFunction(){
    this.toastItService.setConfig(this.toastConfig);
  }
  ```

##### 4. Create and fire Toast
  ```javascript
  import {Toast, ToastType} from 'ngx-toast-it';
  ...
  public toast: Toast = {
      type: ToastType.success,
      heading: 'Great',
      subheading?: 'You found the Toast Component',
      message: 'Let us know what you like about it',
      timeout?: 0
    };
  ...
  public someFunction(){
      this.toastItService.createToast(this.toast);
  }
  ```


## Development

* Clone the repo or [download](https://github.com/Hangar42-de/ngx-toast-it/archive/master.zip) it
* Install dependencies: ``npm install``
* Run ``npm run build:library``
* Run ``ng serve``

## License

GPLv3 [Link](https://github.com/Hangar42-de/ngx-toast-it/blob/master/LICENSE/)

## Maintainers

- [Hangar 42](https://hangar42.de)
- [Dennis Rösner](https://rösner.de)

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