https://github.com/tiaanduplessis/react-micromodal
React wrapper for Micromodal.js
https://github.com/tiaanduplessis/react-micromodal
micromodal modal react react-modal wrapper
Last synced: 2 months ago
JSON representation
React wrapper for Micromodal.js
- Host: GitHub
- URL: https://github.com/tiaanduplessis/react-micromodal
- Owner: tiaanduplessis
- Created: 2019-04-04T22:13:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T04:26:02.000Z (about 6 years ago)
- Last Synced: 2025-07-04T11:12:21.702Z (about 1 year ago)
- Topics: micromodal, modal, react, react-modal, wrapper
- Language: JavaScript
- Homepage: https://tiaanduplessis.github.io/react-micromodal/
- Size: 1020 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-micromodal
> React wrapper for [Micromodal.js](https://micromodal.now.sh/#)
[](https://www.npmjs.com/package/react-micromodal) [](https://standardjs.com)
## Install
```bash
npm install --save react-micromodal.js
```
## Usage
```jsx
import React from 'react'
import ReactDOM from 'react-dom'
import Modal from 'react-micromodal'
import './index.css'
export default class App extends React.Component {
state = {
show: false,
}
componentDidMount() {
setTimeout(() => {
this.setState({ show: true })
setTimeout(() => {
this.setState({ show: false })
}, 3000)
}, 3000)
}
render() {
const { show } = this.state
return (
Wait for it
console.log('Showing!')}
onClose={() => console.log('Closing down')}
disableScroll={false}
disableFocus={false}
awaitCloseAnimation={false}
debugMode={false}
>
Hello
)
}
}
```
Check out the [MicroModal Docs](https://micromodal.now.sh/#) for more information.
## License
MIT © [tiaanduplessis](https://github.com/tiaanduplessis)