# @lukana/alerts

> Alerts.

Latest version **2.0.1** (published 2022-12-09) · 0 weekly downloads

## Install

```sh
npm install @lukana/alerts
pnpm add @lukana/alerts
yarn add @lukana/alerts
bun add @lukana/alerts
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-12-09 |
| First published | 2018-07-06 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 66.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | piernik |
| Keywords | alerts, toasts, toaster, alert, angular |

## Links

- npm: https://www.npmjs.com/package/@lukana/alerts
- npm.io page: https://npm.io/package/@lukana/alerts

## Dependencies (1)

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

## 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

- 2.0.1 (latest) — 2022-12-09
- 2.0.0 — 2022-12-08
- 1.0.0 — 2021-09-10
- 0.9.2-1 — 2021-03-08
- 0.9.2 — 2021-03-08
- 0.9.1 — 2020-03-24
- 0.9.0 — 2020-03-23
- 0.1.0 — 2019-01-18
- 0.0.6 — 2018-12-03
- 0.0.5 — 2018-12-03
- 0.0.4 — 2018-07-06
- 0.0.3 — 2018-07-06
- 0.0.2 — 2018-07-06

## README

# Lukana alerts

Alerts.

# Usage

1. Add `@lukana/alerts/scss/alerts` to Your `style.scss` file or use Your own styles.
1. Import `AlertsModule` as dependency.
1. Use somewhere in template

    ```html
    <lukana-alerts></lukana-alerts>
    ```

    You can provide `[position]` attribute which is of type AlertsPosition. Default is `top-right`
1. To print alert use `AlertsService` with one of these
    ```typescript
    AlertsService.addSuccess('Success');
    AlertsService.addError('Error', 0);
    AlertsService.addInfo('Info');
    AlertsService.addWarning('Warning', 2000);
    ```
    As second param You can provide `closeTime` in miliseconds - default: 4000. If You give 0 it won't be closed automagically.

# Positions

```typescript
export enum AlertsPosition {
  TopRight = 'top-right',
  BottomRight = 'bottom-right',
  BottomLeft = 'bottom-left',
  TopLeft = 'top-left',
  TopFullWidth = 'top-full-width',
  BottomFullWidth = 'bottom-full-width',
}
```

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