Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/swimshahriar/re-modal

A simple react modal, dropdown (draggable) npm package.
https://github.com/swimshahriar/re-modal

draggable modal nested-modal react react-dropdown react-modal react-portal

Last synced: 13 days ago
JSON representation

A simple react modal, dropdown (draggable) npm package.

Awesome Lists containing this project

README

        

### Features

- Supports Nested modal ✅
- Supports draggable dropdown menu ✅
- Style object for styling 🖌

### Support

Buy Me A Coffee

### Installation

```zsh
npm i @swimshahriar/re-modal
# or
yarn add @swimshahriar/re-modal
```

### Examples

Link: [sandbox](https://codesandbox.io/s/swimshahriar-re-modal-cjbfd?file=/src/App.js)

### Props

| Prop | Type | isRequired |
| ------------- | --------------------------- | ------------------------------ |
| open | boolean | required |
| onClose | function | required |
| type | string ('modal','dropdown') | optional |
| isOverlay | boolean | optional |
| draggable | boolean | optional |
| targetRef | useRef Element | required if type is 'dropdown' |
| style | style object | optional |
| dragAreaStyle | style object | optional |