# expose-modal

> Dependency free javascript modal plugin.

Latest version **0.1.0** (published 2015-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install expose-modal
pnpm add expose-modal
yarn add expose-modal
bun add expose-modal
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-04-02 |
| First published | 2015-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Travis Arnold |
| Maintainers | souporserious |
| Keywords | modal, popup, dialog |

## Links

- npm: https://www.npmjs.com/package/expose-modal
- Repository: https://github.com/souporserious/expose-modal
- Issues: https://github.com/souporserious/expose-modal/issues
- npm.io page: https://npm.io/package/expose-modal

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

- 0.1.0 (latest) — 2015-04-02

## README

Expose Modal
============

An easy to use modal that responds to it's environment. Documentation coming soon.

## Installation

    npm install expose-modal --save

## Usage

    var Expose = require('expose-modal');
    
    // Init Multiple Modals
    var modals = document.querySelectorAll('[data-expose]');

    for(var i = modals.length; i--;) {
        
        var expose = new Expose(modals[i]);

        // listen for modal open/close
        expose.modal.addEventListener('expose:opened', onModalOpen, false);
        expose.modal.addEventListener('expose:closed', onModalClose, false);
        
        // close modal with cancel button
        expose.modal.querySelector('.modal_cancel').addEventListener('click', closeModal.bind(expose), false);
    }

    function onModalOpen() {
        //console.log('modal opened');
    }

    function onModalClose() {
        //console.log('modal closed');
    }

    function closeModal() {
        this.closeModal();
    }


## Release History

* 0.1.0 Initial release

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