# vue-modal-service

> Simple modal service for (vue 2 || nuxt)

Latest version **1.4.3** (published 2022-05-11) · 0 weekly downloads

## Install

```sh
npm install vue-modal-service
pnpm add vue-modal-service
yarn add vue-modal-service
bun add vue-modal-service
```

## 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.4.3 |
| Published | 2022-05-11 |
| First published | 2022-03-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 755.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Bazarbayev abylay |
| Maintainers | abylail |
| Keywords | vue, vuejs, dialog, modal, vue modal, vue-modal-service, vue modal service, vue-modal |

## Links

- npm: https://www.npmjs.com/package/vue-modal-service
- Repository: https://github.com/Abylail/vue-modal-service
- Homepage: https://github.com/Abylail/vue-modal-service#readme
- Issues: https://github.com/Abylail/vue-modal-service/issues
- npm.io page: https://npm.io/package/vue-modal-service

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 1.4.3 (latest) — 2022-05-11
- 1.4.2 — 2022-05-11
- 1.4.1 — 2022-05-11
- 1.4.0 — 2022-05-11
- 1.3.3 — 2022-04-28
- 1.3.2 — 2022-04-28
- 1.3.1 — 2022-03-31
- 1.3.0 — 2022-03-30
- 1.2.6 — 2022-03-29
- 1.2.5 — 2022-03-29
- 1.2.4 — 2022-03-29
- 1.2.3 — 2022-03-29
- 1.2.2 — 2022-03-29
- 1.2.1 — 2022-03-29
- 1.1.1 — 2022-03-10
- … 7 more at https://npm.io/package/vue-modal-service/versions

## README

# vue-modal-service

## Install
```
npm i vue-modal-service
```

## Quick Start
```
import it to global css

@import "~vue-modal-service/dist/modal-service.css";

OR

(for NUXT)
css: [
    "vue-modal-service/dist/modal-service.css",
  ],
```
---
```
import Vue from 'vue';
import ModalService from 'vue-modal-service';

Vue.use(ModalService);
```

## How to use
Creating modal
```
<modal name="some-modal-name" size="middle" close-button>
    <div>hey</div>
</modal>
```
---
Available sizes
```
large|big|middle|small
```
---
Show modal
```
this.$modal.show('some-modal-name');
```
---
Set data in modal
```
How open modal with some data
-> payload is any that you need
this.$modal.show('some-modal-name', payload); <-

You can get it in this.$modal.$payload
```
---
Hide modal
```
this.$modal.hide('some-modal-name');
```
---
Emits
```
<modal @onShow="someMethod" ...
<modal @onHide="someMethod" ...
```

## How to debug
Available modals
```
this.$modal.$availableModals
```
---
Active modal name
```
this.$modal.$active
```
---
Queue of hidden modal
```
this.$modal.$queue
```

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