{"id":15354768,"url":"https://github.com/bokuweb/react-elastic-modal","last_synced_at":"2025-04-15T06:16:53.889Z","repository":{"id":66334366,"uuid":"52247236","full_name":"bokuweb/react-elastic-modal","owner":"bokuweb","description":"React elastic modal component.","archived":false,"fork":false,"pushed_at":"2023-12-15T11:48:43.000Z","size":2267,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T16:51:23.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bokuweb.github.io/react-elastic-modal","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bokuweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-22T04:32:25.000Z","updated_at":"2019-04-08T16:49:56.000Z","dependencies_parsed_at":"2024-10-01T12:21:02.346Z","dependency_job_id":"08dc818f-6287-4d78-bb05-0123a91699cc","html_url":"https://github.com/bokuweb/react-elastic-modal","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Freact-elastic-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Freact-elastic-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Freact-elastic-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Freact-elastic-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bokuweb","download_url":"https://codeload.github.com/bokuweb/react-elastic-modal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809023,"owners_count":21164895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:20:53.437Z","updated_at":"2025-04-15T06:16:53.870Z","avatar_url":"https://github.com/bokuweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-elastic-modal\n\nReact elastic modal component\n\n[![Build Status](https://travis-ci.org/bokuweb/react-elastic-modal.svg?branch=master)](https://travis-ci.org/bokuweb/react-elastic-modal)\n[![Code Climate](https://codeclimate.com/github/bokuweb/react-elastic-modal/badges/gpa.svg)](https://codeclimate.com/github/bokuweb/react-elastic-modal)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n\n## Screenshot\n\n![screenshot](https://github.com/bokuweb/react-elastic-modal/blob/master/screenshot.gif?raw=true)\n\n## DEMO\n\nhttp://bokuweb.github.io/react-elastic-modal/\n\n## Example\n\n\n``` jsx\n\u003cModal\n  isOpen={ this.state.isOpen }\n  onRequestClose={ () =\u003e this.setState({ isOpen: false }) }\n  modal={{\n    width: '50%',\n    height: '360px',\n    backgroundColor: '#fff',\n    opacity: 0.5,\n  }}\n  overlay={{\n    background: 'rgba(0, 0, 0, 0.4)',\n  }}\n\u003e\n  \u003cdiv style={{ padding: '50px', overflowY: 'scroll', position: 'relative' }}\u003e\n    \u003cp\u003eLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\u003c/p\u003e\n    \u003cdiv className=\"button--close\" onClick={ () =\u003e this.setState({ isOpen: false }) }\u003eclose modal\u003c/div\u003e\n    \u003ci\n      className=\"fa fa-close\"\n      onClick={ () =\u003e this.setState({ isOpen: false }) }\n      style={{ color: '#fff', position: 'absolute', top: '20px', right: '20px', cursor: 'pointer', fontSize: '20px' }}\n    /\u003e\n  \u003c/div\u003e\n\u003c/Modal\u003e\n```\n\n## Props\n\n### `isOpen`: PropTypes.bool.isRequired\n\nIf true, the modal is open. If false, the modal is closed.\n\n### `onRequestClose`: PropTypes.func\n\nThis callback is called when overlay element clicked.\nIf you want to close modal when overlay clicked, please set `isOpen` state `false` in this callback. \n\n### `modal`: PropTypes.shape\n\nThis props specify modal styles.\n\n``` javascript\nmodal: PropTypes.shape({\n  backgroundColor: React.PropTypes.string.isRequired,\n  width: React.PropTypes.string.isRequired,\n  height: React.PropTypes.string.isRequired,\n  opacity: React.PropTypes.number,\n  zIndex: React.PropTypes.number,\n})\n```\n\n- backgroundColor: Specify modal background color.\n- width: Specify modal width. i.e. `width: '100px'` or `width: '50%'`.\n- height: Specify modal width. i.e. `height: '100px'` or `height: '50%'`.\n- opacity: Specify modal opacity. Default value is `1`.\n- zIndex: Specify modal zIndex. Default value is `101`.\n    \n#### Attention\n\nreact-elastic-modal rendered by svg.\nif you set modal size `{width: 100px, height: 200px}`, svg width and height is set `{width: 110px, height: 220px}`.\n    \n### `overlay`: PropTypes.shape\n\nThis props specify overlay styles.\n\n``` javascript\noverlay: PropTypes.shape({\n  background: React.PropTypes.string,\n  zIndex: React.PropTypes.number,\n})\n```\n\n- background: Specify overlay background. Default value is `rgba(0, 0, 0, 0.8)`. \n- zIndex: Specify overlay zIndex. Default value is `100`.\n\n## ChangeLog\n\n### v0.1.3\n\n- Fix test\n\n### v0.1.2\n\n- Bug Fix (thanks @59naga)\n\n### v0.1.1\n\n- Add Unit Test\n\n### v0.1.0\n\n- Published\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Bokuweb\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokuweb%2Freact-elastic-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbokuweb%2Freact-elastic-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokuweb%2Freact-elastic-modal/lists"}