# 2yy-ngx-overlay

> ![Test](https://github.com/2YY/ngx-overlay/workflows/Test/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/c00046125264170a84e5/maintainability)](https://codeclimate.com/github/2YY/ngx-overlay/maintainability) [![Test Coverage](https:/

Latest version **0.0.3** (published 2020-11-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install 2yy-ngx-overlay
pnpm add 2yy-ngx-overlay
yarn add 2yy-ngx-overlay
bun add 2yy-ngx-overlay
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-11-28 |
| First published | 2020-11-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 40.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | 2yy |

## Links

- npm: https://www.npmjs.com/package/2yy-ngx-overlay
- Repository: https://github.com/2YY/ngx-overlay
- Issues: https://github.com/2YY/ngx-overlay/issues
- npm.io page: https://npm.io/package/2yy-ngx-overlay

## Dependencies (1)

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

## Recent versions

- 0.0.3 (latest) — 2020-11-28
- 0.0.2 — 2020-11-28
- 0.0.1 — 2020-11-13

## README

# NgxOverlay

![Test](https://github.com/2YY/ngx-overlay/workflows/Test/badge.svg)
[![Maintainability](https://api.codeclimate.com/v1/badges/c00046125264170a84e5/maintainability)](https://codeclimate.com/github/2YY/ngx-overlay/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c00046125264170a84e5/test_coverage)](https://codeclimate.com/github/2YY/ngx-overlay/test_coverage)

## Installation

`npm i 2yy-ngx-overlay`

## Motivation

- To follow the DRY Principle when writing overlay showing/hiding logic.
- Manage multiple overlay state in a screen.

## Usage

1. Create your overlay slot (with your overlay config)
2. Attach your overlay to slot

### Create your overlay slot

`this.myOverlaySlotId = this.ngxOverlayService.addOverlaySlot(myOverlayConfig)`

### Attach your overlay to slot

`this.ngxOverlayService.show(this.myPortal, this.myOverlaySlotId)`

## License

[MIT License](./LICENSE)

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