6.4.2 • Published 10 months ago

react-responsive-modal v6.4.2

Weekly downloads
35,066
License
MIT
Repository
-
Last release
10 months ago

react-responsive-modal

npm version npm downloads per month codecov dependencies Status

A simple responsive and accessible react modal compatible with React 16 and ready for React 17.

  • Focus trap inside the modal.
  • Centered modals.
  • Scrolling modals.
  • Multiple modals.
  • Accessible modals.
  • Easily customizable via props.

Documentation

Installation

With npm: npm install react-responsive-modal --save

Or with yarn: yarn add react-responsive-modal

Usage

Edit react-responsive-modal

import React from 'react';
import ReactDOM from 'react-dom';
import 'react-responsive-modal/styles.css';
import { Modal } from 'react-responsive-modal';

export default class App extends React.Component {
  state = {
    open: false,
  };

  onOpenModal = () => {
    this.setState({ open: true });
  };

  onCloseModal = () => {
    this.setState({ open: false });
  };

  render() {
    const { open } = this.state;
    return (
      <div>
        <button onClick={this.onOpenModal}>Open modal</button>
        <Modal open={open} onClose={this.onCloseModal} center>
          <h2>Simple centered modal</h2>
        </Modal>
      </div>
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app'));

Props

Check the documentation: https://react-responsive-modal.leopradel.com/#props.

License

MIT © Léo Pradel

emotion-reproduce-external-libinsticc_dummy_module6insticc_dummy_module2insticc_dummy_module8reactjs-paypal-payment-buttonmerobato-paypal-paymentmerobato-paypal-payment-button@elasticpath/store-componentshometown.inleihuo-cloud-game-reactts-viewerreact-redux-nightmare-quick-start@axa/aletheiagha-componentscarrier-listingclickwrap-docusignesignature-docusignmui-ui@everything-registry/sub-chunk-2607tourstream-mhb-libui-food2c@luuhuongtech/mui-customized-componentskey-esg-component-librarykimmaisui@dieyne/mis-libstrannizza-todolistsevenstartslip-full-2019login-clientsingular-uidp-react-comments-sectionmerobato-stripe-integrationt2mumuti-admin-request-viewumuti-business-request-tablevaluex-react-appdsny_dashboardunicus-one-widgetmytravelpopo@ereminnf/rui@experium/findy-form@experium/jobot-formoffcourse-ui-componentstest-for-meswym-firebase-login-buttonep-commerce-react-components_tempvernost-react-js-gcc-atomvernost_common_componentenavia-io-app-core-test@welight/easyimpact-widget@wal3/rc-login@wclubteam/baro-designsystem@zhifez/react-portauthafito-uiagiir-react-componentsbaro-designsystem@automata-network/wallet-react@axa-ch/aletheia@adactive/arc-qrcodeaqlrcaqt-base-componentscomfenalco-react-atomic@cohubinc/cohub-ui@codedrift/common-uicomponents-react-testbreakout-frontend@bbp/nexus-react@charlesmack34/react-comments-section@closet-design-system/core-framer@copart/backoffice-charges-module@cordelia273/react-image-grid@dcrescim/shared-components@cleargdpr/elementsts-viewer-demots-viewer-package-npmtouka@shashank8317/webapp-project@simpleform/editor@simpleform/inula-editorgcc-atom-vernost-newgrsbet-frontendreact-comments-sectionreact-comments-section-pt-brreact-comments-sectionv2@parataxic/shared-uireact-confirmation-modalfab-uievent-sdkvetravel-atoms-controls-newexternal-generic-componentexternal-generic-component_1@gocommerce/styleguide@guozg/react-comments-section@josec59/ui-library@iameli/livepeer-playerposipages@ragopor/dtac-component-webreact-storefront-componentsreact-swift-nested-commentsreact-sotefront-components-test
6.4.2

10 months ago

6.3.2

1 year ago

6.4.1

1 year ago

6.2.0

2 years ago

6.1.0

3 years ago

6.0.1

3 years ago

6.0.0

3 years ago

5.2.6

3 years ago

5.2.5

3 years ago

5.2.1

3 years ago

5.2.0

3 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.6.0

5 years ago

3.5.1

5 years ago

3.5.0

5 years ago

3.4.0

6 years ago

3.3.0

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.9.4

6 years ago

1.9.3

6 years ago

1.9.2

6 years ago

1.9.0

7 years ago

1.8.0

7 years ago

1.7.1

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.0

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.3.0

7 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago