{"id":20171859,"url":"https://github.com/maikenegreiros/modal-boxes","last_synced_at":"2026-06-20T12:33:42.521Z","repository":{"id":143727147,"uuid":"152086588","full_name":"maikenegreiros/modal-boxes","owner":"maikenegreiros","description":"A simple JS script to open and close Modal Boxes. It's useful to menu bars as well","archived":false,"fork":false,"pushed_at":"2018-11-06T13:58:41.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-30T20:32:56.640Z","etag":null,"topics":["modal-box","modal-dialog","modal-dialogs","modalbox","modals"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maikenegreiros.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-10-08T13:40:51.000Z","updated_at":"2018-12-30T14:58:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8402dd2d-e286-4c2d-b2c4-a6d8763059d6","html_url":"https://github.com/maikenegreiros/modal-boxes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maikenegreiros/modal-boxes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikenegreiros%2Fmodal-boxes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikenegreiros%2Fmodal-boxes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikenegreiros%2Fmodal-boxes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikenegreiros%2Fmodal-boxes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maikenegreiros","download_url":"https://codeload.github.com/maikenegreiros/modal-boxes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikenegreiros%2Fmodal-boxes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34570537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["modal-box","modal-dialog","modal-dialogs","modalbox","modals"],"created_at":"2024-11-14T01:28:10.972Z","updated_at":"2026-06-20T12:33:42.507Z","avatar_url":"https://github.com/maikenegreiros.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modal Boxes\n\nIf your modal box is both opened and closed by the same button, you can do like the example below\n\n```js\nimport ModalBoxes from 'modal-boxes'\n\nconst menu = document.querySelector('.menu')\nconst btMenu = document.querySelector('.bt-menu')\nModalBoxes(menu, btMenu)\n```\n\nInstead, if your modal box have one button to open and another to close, you must do like that\n\n```js\nimport ModalBoxes from 'modal-boxes'\n\nconst menu = document.querySelector('.menu')\nconst buttonOpenMenu = document.querySelector('.bt-menu')\nconst buttonCloseMenu = document.querySelector('.bt-close-menu')\nconst options = {\n    buttonClose: buttonCloseMenu\n}\nModalBoxes(menu, btMenu, option)\n```\n\nif you want to assign some custom css class to the button or the modal box, you can do as follows\n\n```js\nimport ModalBoxes from 'modal-boxes'\n\nconst menu = document.querySelector('.menu')\nconst btMenu = document.querySelector('.bt-menu')\nconst options = {\n    menuActiveClass: \"my-css-class\",\n    menuInactiveClass: \"my-other-css-class\",\n    buttonActiveClass: \"another-css-class\",\n    buttonInactiveClass: \"again-another-css-class\"\n}\nModalBoxes(menu, btMenu, options)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaikenegreiros%2Fmodal-boxes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaikenegreiros%2Fmodal-boxes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaikenegreiros%2Fmodal-boxes/lists"}