{"id":15321934,"url":"https://github.com/akmamun/react-modal-overlay","last_synced_at":"2025-04-15T02:37:23.892Z","repository":{"id":38222748,"uuid":"269282257","full_name":"akmamun/react-modal-overlay","owner":"akmamun","description":"Accessible simple modal component package for React JS","archived":false,"fork":false,"pushed_at":"2024-05-02T05:11:58.000Z","size":4656,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T14:22:24.368Z","etag":null,"topics":["custom-modal","modal","overlay","react","react-modal","react-modal-component","react-modal-popup","react-overlay"],"latest_commit_sha":null,"homepage":"https://codesandbox.io/s/react-modal-overlay-wybon","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/akmamun.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":"2020-06-04T06:48:51.000Z","updated_at":"2024-05-17T07:42:04.000Z","dependencies_parsed_at":"2023-02-08T19:25:13.439Z","dependency_job_id":"36eedaad-f0ea-4bbb-9843-62487186dd20","html_url":"https://github.com/akmamun/react-modal-overlay","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.25806451612903225","last_synced_commit":"1c5ff34fab615f620f62aa9249562665f8e8e837"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Freact-modal-overlay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Freact-modal-overlay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Freact-modal-overlay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Freact-modal-overlay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akmamun","download_url":"https://codeload.github.com/akmamun/react-modal-overlay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248995103,"owners_count":21195497,"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":["custom-modal","modal","overlay","react","react-modal","react-modal-component","react-modal-popup","react-overlay"],"created_at":"2024-10-01T09:13:41.389Z","updated_at":"2025-04-15T02:37:23.876Z","avatar_url":"https://github.com/akmamun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-modal-overlay\n\nAccessible simple modal overlay component for React JS\n\n[![NPM](https://img.shields.io/npm/v/react-modal-overlay.svg)](https://www.npmjs.com/package/react-modal-overlay) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Build Status](https://travis-ci.org/akmamun/react-modal-overlay.svg?branch=master)](https://travis-ci.org/akmamun/react-modal-overlay)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Demos](#demos)\n\n## Installation\n\nTo install, you can use [npm](https://npmjs.com/) or [yarn](https://yarnpkg.com):\n\n```bash\nnpm install react-modal-overlay\nyarn add react-modal-overlay\n```\n\n## Usage\n\n- Using Hooks\n\n```jsx\nimport React, { useState } from 'react'\nimport { Modal } from 'react-modal-overlay'\nimport 'react-modal-overlay/dist/index.css'\n\nexport default function App() {\n  const [isOpen, setIsOpen] = useState(false)\n\n  return (\n    \u003cdiv\u003e\n      \u003cbutton onClick={() =\u003e setIsOpen(true)}\u003eClick Modal!\u003c/button\u003e\n      \u003cModal show={isOpen} closeModal={() =\u003e setIsOpen(false)}\u003e\n        \u003ch4\u003e here is hook modal data \u003c/h4\u003e\n      \u003c/Modal\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n- Class Based Component\n\n```jsx\nimport React, { Component } from 'react'\nimport { Modal } from 'react-modal-overlay'\nimport 'react-modal-overlay/dist/index.css'\n\nexport default class ExampleModal extends Component {\n  state = {\n    showModal: false\n  }\n\n  toggleModal = () =\u003e {\n    this.setState({\n      showModal: !this.state.showModal\n    })\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cbutton onClick={this.toggleModal}\u003eClick Modal!\u003c/button\u003e\n        \u003cModal show={this.state.showModal} closeModal={this.toggleModal}\u003e\n          \u003ch4\u003e here is modal data \u003c/h4\u003e\n        \u003c/Modal\u003e\n      \u003c/div\u003e\n    )\n  }\n}\n```\n\n## Demos\n\n- [Hooks example](https://codesandbox.io/s/react-modal-overlay-wybon?file=/src/Hooks.js)\n\n- [Class based Component example](https://codesandbox.io/s/react-modal-overlay-wybon)\n\n## License\n\nMIT © [akmamun](https://github.com/akmamun)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmamun%2Freact-modal-overlay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakmamun%2Freact-modal-overlay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmamun%2Freact-modal-overlay/lists"}