# modalar

> Modalar is a small unopinionated react library for modals(dialogs) and alert.

Latest version **1.0.17** (published 2020-05-08) · ISC license · 0 weekly downloads

## Install

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

## 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.0.17 |
| Published | 2020-05-08 |
| First published | 2020-05-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | galkatz373 |
| Keywords | modal, dialog, modalar |

## Links

- npm: https://www.npmjs.com/package/modalar
- Repository: https://github.com/galkatz373/modalar
- Homepage: https://github.com/galkatz373/modalar#readme
- Issues: https://github.com/galkatz373/modalar/issues
- npm.io page: https://npm.io/package/modalar

## 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.0.17 (latest) — 2020-05-08
- 1.0.16 — 2020-05-08
- 1.0.15 — 2020-05-08
- 1.0.14 — 2020-05-08
- 1.0.13 — 2020-05-08
- 1.0.12 — 2020-05-08
- 1.0.11 — 2020-05-08
- 1.0.10 — 2020-05-08
- 1.0.9 — 2020-05-08
- 1.0.8 — 2020-05-08
- 1.0.7 — 2020-05-08
- 1.0.6 — 2020-05-08
- 1.0.5 — 2020-05-08
- 1.0.4 — 2020-05-07
- 1.0.3 — 2020-05-07
- … 3 more at https://npm.io/package/modalar/versions

## README

# Modalar

Modalar is a small unopinionated react library for modals(dialogs) and alert.

## Installation

Use npm or yarn to install modalar

**NPM**:

```bash
npm install modalar
```

**yarn**:

```bash
yarn install modalar
```

## Usage

### modal

```javascript
import React from "react"
import { useModal, Modal } from "modalar"

const App = () => {
  const { toggle, show } = useModal()
  return (
    <div>
      <button onClick={toggle}>Show Modal</button>
      <Modal toggle={toggle} show={show}>
        <div>content of modal</div>
      </Modal>
    </div>
  )
}

export default App
```

### alert

```javascript
import React from "react"
import { showAlert } from "modalar"

const App = () => {
  return (
    <div>
      <button onClick={() => showAlert({ content: <div>content</div> })}>Show Alert</button>
    </div>
  )
}

export default App
```

## Demo

### [modal](https://stackblitz.com/edit/react-58tqeq)

### [alert](https://stackblitz.com/edit/react-r9wchs)

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)

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