react-just-modal

a simple modal component for react

Usage no npm install needed!

<script type="module">
  import reactJustModal from 'https://cdn.skypack.dev/react-just-modal';
</script>

README

react-just-modal

a simple modal component for react

JavaScript Style GuideDownloads

Installation

npm install --save react-just-modal

Usage

import React, { Component } from 'react'

import Modal from 'react-just-modal'

class Example extends Component {
  render() {
    return (
      <Modal visible={true} onCloseOutsideClick={true}>
        <div>Simple modal</div>
      </Modal>
    )
  }
}

simple-react-modal Props

Prop Type Description
visible boolean to open or close modal
onCloseOutsideClick boolean to open or close modal when outside click
onClose function callback to close modal
className string style

Screenshots

Screenshot

Authors

License

MIT © Btechiexyz