# awesomemodal

> Vanilla Javascript plugin for creating modals.

Latest version **1.1.1** (published 2021-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install awesomemodal
pnpm add awesomemodal
yarn add awesomemodal
bun add awesomemodal
```

## 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.1.1 |
| Published | 2021-03-25 |
| First published | 2021-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yuri Tsimbal @sellsteam13 |
| Maintainers | sellsteam133 |
| Keywords | modal, js, html, scss, vanilla, js, lightweight |

## Links

- npm: https://www.npmjs.com/package/awesomemodal
- Repository: https://github.com/sellsteam13/awesomeModal
- Homepage: https://github.com/sellsteam13/awesomeModal#readme
- Issues: https://github.com/sellsteam13/awesomeModal/issues
- npm.io page: https://npm.io/package/awesomemodal

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.1 (latest) — 2021-03-25
- 1.1.0 — 2021-03-25
- 1.0.4 — 2021-03-25
- 1.0.3 — 2021-03-22
- 1.0.2 — 2021-03-22
- 1.0.1 — 2021-03-22
- 1.0.0 — 2021-03-22

## README

# AwesomeModal

A vanilla, lightweight JavaScript plugin for creating custom modals.
Live Demo [click](http://tsymbal01.beget.tech/awesomeModal/).

## Installation

Use the package manager [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) to install AwesomeModal.

```bash
npm install awesomemodal
yarn add awesomemodal
```

## Usage
```
// Css
<link href="css/AwesomeModal.css" rel="stylesheet" type="text/css">

// JavaScript
import AwesomeModal

const myCustomModal = new AwesomeModal('.awesomeModal', {options})
```
## Options, Methods, Events
### Options
```
@string (default: empty) - { overlayClass: '.anyClass' } - adding new custom classes for overlay,
@string (default: 'rgba(0,0,0,.1)') - { overlayBackground: (color, image or gradient) } - changing overlay background,
@boolean (default: false) - { overlayCloseAbleDisabled: true/false } - defines whether the modal will be closed when the overlay is clicked,
@boolean (default: false) - { modalAnimateDisabled: true/false } - defines whether the modal will animate
 ```
### Methods
```
instance.open(), instance.close()
```
### Events
Note: add event listeners to modalElement, not overlay.
```
close - Event will fired right after modal closing
open - Event will fired right after modal opening
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)

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