Socket
Socket
Sign inDemoInstall

@react-max/modal

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-max/modal

Basic react modal popup


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@react-max/modal

React modal dialogs. ⚛️

NPM JavaScript Style Guide

Install

For support for react <16.8

# If you use npm:
npm install --save @react-max/modal

# Or if you use Yarn:
yarn add @react-max/modal

Usage

import React, { Fragment, useState } from 'react'
import Modal from '@react-max/modal'

export default function App() {
  const [visible, setVisible] = useState(false);

  return (
    <Fragment>
      <button type="button" onClick={() => setVisible(true)}>
        open modal
      </button>

      <Modal
        title="Modal"
        visible={visible}
        onClose={() => setVisible(false)}
      >
        contents
      </Modal>
    </Fragment>
  );
}

Live Demo

Props

NameTypeDefaultDescription
visiblebooleanfalse
childrenReactNode
onClose() => void
titleReactNode
width`numberstring`520
zIndexnumber1000
maskbooleantrue
closeButtonReactNode
showsCloseButtonbooleantrue
isMaskClosablebooleantrue
isEscKeyClosablebooleantrue
isCenteredModebooleanfalse
isExpandedModebooleanfalse
modalClassNamestring
maskClassNamestring
bodyClassNamestring
contentClassNamestring
modalStyleCSSProperties
maskStyleCSSProperties
bodyStyleCSSProperties
contentStyleCSSProperties

Thanks

Support it by joining stargazers for this repository. :star:

License

MIT © almond-bongbong

Keywords

FAQs

Package last updated on 09 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc