Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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

  • 0.0.4-0
  • unpublished
  • Source
  • npm
  • Socket score

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
maskStyleCSSProperties
closeButtonReactNode
showsCloseButtonbooleantrue
isMaskClosablebooleantrue
isEscKeyClosablebooleantrue
isCenteredModebooleanfalse
isExpandedModebooleanfalse
modalClassNamestring
maskClassNamestring
bodyClassNamestring
contentClassNamestring

Thanks

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

License

MIT © almond-bongbong

Keywords

FAQs

Package last updated on 07 Sep 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