# db-react-modal

> ReactModal is a simple component that provide an easy way to implement a modal dialog inside your projects. At the moment is not ready to being used.

Latest version **1.0.5-p4** (published 2015-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install db-react-modal
pnpm add db-react-modal
yarn add db-react-modal
bun add db-react-modal
```

## 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.5-p4 |
| Published | 2015-09-08 |
| First published | 2015-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | scerelli |
| Keywords | react, react-component, modal, dialog |

## Links

- npm: https://www.npmjs.com/package/db-react-modal
- npm.io page: https://npm.io/package/db-react-modal

## Dependencies (2)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [react-tools](https://npm.io/package/react-tools.md) *

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.5-p4 (latest) — 2015-09-08
- 1.0.5-p3 — 2015-09-08
- 1.0.5-p1 — 2015-09-08
- 1.0.5 — 2015-09-08
- 1.0.3-moze1 — 2015-09-04
- 1.0.37 — 2015-09-02
- 1.0.34 — 2015-09-02
- 1.0.33 — 2015-09-02
- 1.0.32 — 2015-09-02
- 1.0.31 — 2015-09-02
- 1.0.3 — 2015-09-02

## README

# React Modal [![Build Status](https://travis-ci.org/scerelli/react-modal.svg?branch=master)](https://travis-ci.org/scerelli/react-modal)

This component is a simple and easy to use modal made for react js.

### What does it have? 

- it support fade animation while open and closing modal
- it support esc key to close the mode
- it support click on overlay to close the modal
- is css free, you just have to include the component and it simplt works
- is easy to implement.


### Implementation example


```
var React = require('react');
var ReactModal = require('../../lib/components/ReactModal');

var App = React.createClass({
  showModal: function(){
    this.refs.modal.show();
  },

  beforeOpen: function() {
    console.log('beforeOpen')
  },

  beforeClose: function() {
    console.log('beforeClose')
  },

  afterOpen: function() {
    console.log('afterOpen')
  },

  afterClose: function() {
    console.log('afterClose')
  },

  render: function() {
    console.log('render');
    return (
      <div className="example">
        <a onClick={this.showModal}>Click To Show Modal</a>
        <ReactModal ref="modal"
                    title="Test title modale"
                    beforeOpen={this.beforeOpen}
                    beforeClose={this.beforeClose}
                    afterOpen={this.afterOpen}
                    afterClose={this.afterClose}>
          Lorem Ipsum Doloret Sit Amet
        </ReactModal>
      </div>
    );
  }
});
```

### Props available
```title```
it accept string and defines the title to show in the header of modal.

```beforeOpen, beforeClose, afterOpen, afterClose```

these callbacks speak by themeselves, when you have to do something before/after opening/closing the modal use these callbacks.

```animDuration```
it takes an integer and it defines the animation duration while opening and closing modal

```animModal``
it defines if a modal must be or not animated while opening/closing it.

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