{"name":"react-modal","version":"1.7.5","description":"Accessible modal dialog component for React.JS","main":"./lib/index.js","repository":{"type":"git","url":"git+https://github.com/reactjs/react-modal.git"},"homepage":"https://github.com/reactjs/react-modal","bugs":{"url":"https://github.com/reactjs/react-modal/issues"},"directories":{"example":"examples"},"scripts":{"test":"NODE_ENV=test karma start","start":"scripts/dev-examples","docs":"npm-run-all docs:*","docs-dev":"npm-run-all docs:clean docs:prepare docs:build:watch","docs:clean":"rimraf _book","docs:prepare":"gitbook install","docs:build":"gitbook build -g reactjs/react-modal","docs:build:watch":"gitbook serve","docs:publish":"cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:reactjs/react-modal gh-pages --force"},"authors":["Ryan Florence"],"license":"MIT","devDependencies":{"babel-core":"^6.7.4","babel-loader":"^6.2.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","envify":"^3.4.1","expect":"^1.20.2","gitbook-cli":"^2.3.0","karma":"^1.3.0","karma-chrome-launcher":"2.0.0","karma-cli":"1.0.1","karma-firefox-launcher":"1.0.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.1","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.8.1","mocha":"3.2.0","npm-run-all":"^3.1.2","react":"^15.0.0","react-addons-test-utils":"^15.0.0","react-dom":"^15.0.0","rf-release":"0.4.0","rimraf":"^2.5.4","sinon":"next","uglify-js":"2.4.24","webpack":"^1.12.14","webpack-dev-server":"1.11.0"},"dependencies":{"create-react-class":"^15.5.2","element-class":"^0.2.0","exenv":"1.2.0","lodash.assign":"^4.2.0","prop-types":"^15.5.7"},"peerDependencies":{"react":"^0.14.0 || ^15.0.0","react-dom":"^0.14.0 || ^15.0.0"},"tags":["react","modal","dialog"],"keywords":["react","react-component","modal","dialog"],"gitHead":"4bae32b56a21f9b1df65136a93e51fdadc92cd20","_id":"react-modal@1.7.5","_shasum":"2b144d3067c8dcd95d24081d1a55eacfce86deaa","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.2","_npmUser":{"name":"claydiffrient","email":"clay.diffrient@gmail.com"},"dist":{"shasum":"2b144d3067c8dcd95d24081d1a55eacfce86deaa","tarball":"http://registry-npm.ywwl.com/react-modal/download/react-modal-1.7.5.tgz","integrity":"sha512-vC+8Hvj9J4ym4WtbLm8yidojgjlDhTm7RlPpDkUjpRyMgJt+G+f32fIABPdrjzTgijMdIsaxkXoYgbIS3sH0EQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICfHJa8wOgXiLBoS0Gazk5LGPPA5gT1JoqOyXwHw4of1AiEA1tz75UN3zxrIQbZrgm7LSXudck2na2Qe/Qk4LY7fR/Q="}],"size":100279,"noattachment":false,"key":"/react-modal/-/react-modal-1.7.5.tgz"},"maintainers":[{"name":"claydiffrient","email":"clay.diffrient@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/react-modal-1.7.5.tgz_1492093321377_0.831016454147175"},"readme":"# react-modal\n\n# NOTE\n\nNeed feedback to push a new version of `react-modal` forward. See issue [#881](https://github.com/reactjs/react-modal/issues/881). \n\n\nAccessible modal dialog component for React.JS\n\n[![Build Status](https://api.travis-ci.org/reactjs/react-modal.svg)](https://travis-ci.org/reactjs/react-modal)\n[![Coverage Status](https://coveralls.io/repos/github/reactjs/react-modal/badge.svg?branch=master)](https://coveralls.io/github/reactjs/react-modal?branch=master)\n![gzip size](http://img.badgesize.io/https://unpkg.com/react-modal/dist/react-modal.min.js?compression=gzip)\n[![Join the chat at https://gitter.im/react-modal/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/react-modal/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n## Table of Contents\n\n* [Installation](#installation)\n* [API documentation](#api-documentation)\n* [Examples](#examples)\n* [Demos](#demos)\n\n## Installation\n\nTo install, you can use [npm](https://npmjs.org/) or [yarn](https://yarnpkg.com):\n\n\n    $ npm install --save react-modal\n    $ yarn add react-modal\n    \nTo install react-modal in React CDN app:\n\n   - Add this CDN script tag after React CDN scripts and before your JS files (for example from [cdnjs](https://cdnjs.com/)): \n\n            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/react-modal/3.14.3/react-modal.min.js\"\n            integrity=\"sha512-MY2jfK3DBnVzdS2V8MXo5lRtr0mNRroUI9hoLVv2/yL3vrJTam3VzASuKQ96fLEpyYIT4a8o7YgtUs5lPjiLVQ==\"\n            crossorigin=\"anonymous\"\n            referrerpolicy=\"no-referrer\"></script>\n\n   - Use `<ReactModal>` tag inside your React CDN app.\n\n\n## API documentation\n\nThe primary documentation for react-modal is the\n[reference book](https://reactjs.github.io/react-modal), which describes the API\nand gives examples of its usage.\n\n## Examples\n\nHere is a simple example of react-modal being used in an app with some custom\nstyles and focusable input elements within the modal content:\n\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Modal from 'react-modal';\n\nconst customStyles = {\n  content: {\n    top: '50%',\n    left: '50%',\n    right: 'auto',\n    bottom: 'auto',\n    marginRight: '-50%',\n    transform: 'translate(-50%, -50%)',\n  },\n};\n\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\nModal.setAppElement('#yourAppElement');\n\nfunction App() {\n  let subtitle;\n  const [modalIsOpen, setIsOpen] = React.useState(false);\n\n  function openModal() {\n    setIsOpen(true);\n  }\n\n  function afterOpenModal() {\n    // references are now sync'd and can be accessed.\n    subtitle.style.color = '#f00';\n  }\n\n  function closeModal() {\n    setIsOpen(false);\n  }\n\n  return (\n    <div>\n      <button onClick={openModal}>Open Modal</button>\n      <Modal\n        isOpen={modalIsOpen}\n        onAfterOpen={afterOpenModal}\n        onRequestClose={closeModal}\n        style={customStyles}\n        contentLabel=\"Example Modal\"\n      >\n        <h2 ref={(_subtitle) => (subtitle = _subtitle)}>Hello</h2>\n        <button onClick={closeModal}>close</button>\n        <div>I am a modal</div>\n        <form>\n          <input />\n          <button>tab navigation</button>\n          <button>stays</button>\n          <button>inside</button>\n          <button>the modal</button>\n        </form>\n      </Modal>\n    </div>\n  );\n}\n\nReactDOM.render(<App />, appElement);\n```\n\nYou can find more examples in the `examples` directory, which you can run in a\nlocal development server using `npm start` or `yarn run start`.\n\n## Demos\n\nThere are several demos hosted on [CodePen](https://codepen.io) which\ndemonstrate various features of react-modal:\n\n* [Minimal example](https://codepen.io/claydiffrient/pen/KNxgav)\n* [Using setAppElement](https://codepen.io/claydiffrient/pen/ENegGJ)\n* [Using onRequestClose](https://codepen.io/claydiffrient/pen/KNjVBx)\n* [Using shouldCloseOnOverlayClick](https://codepen.io/claydiffrient/pen/woLzwo)\n* [Using inline styles](https://codepen.io/claydiffrient/pen/ZBmyKz)\n* [Using CSS classes for styling](https://codepen.io/claydiffrient/pen/KNjVrG)\n* [Customizing the default styles](https://codepen.io/claydiffrient/pen/pNXgqQ)\n","publish_time":1492093323448,"_cnpm_publish_time":1492093323448,"dist-tags":{"latest":"3.16.3","next":"3.0.0-rc2"}}