{"id":15541899,"url":"https://github.com/markcellus/modal-js","last_synced_at":"2026-03-11T05:31:10.819Z","repository":{"id":30344731,"uuid":"33897132","full_name":"markcellus/modal-js","owner":"markcellus","description":"Easily implement modals using vanilla Javascript written in ECMAScript 6. Supports Meteor, AngularJS, React, Polymer and any CSS library, e.g. Bootstrap.","archived":false,"fork":false,"pushed_at":"2021-05-08T01:32:31.000Z","size":799,"stargazers_count":8,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T22:53:39.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/markcellus.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}},"created_at":"2015-04-13T22:18:47.000Z","updated_at":"2025-01-22T13:58:53.000Z","dependencies_parsed_at":"2022-07-31T22:18:05.579Z","dependency_job_id":null,"html_url":"https://github.com/markcellus/modal-js","commit_stats":null,"previous_names":["mkay581/modal-module","mkay581/modal-js"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/markcellus/modal-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcellus%2Fmodal-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcellus%2Fmodal-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcellus%2Fmodal-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcellus%2Fmodal-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markcellus","download_url":"https://codeload.github.com/markcellus/modal-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcellus%2Fmodal-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"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":[],"created_at":"2024-10-02T12:19:59.941Z","updated_at":"2026-03-11T05:31:10.781Z","avatar_url":"https://github.com/markcellus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/mkay581/modal-js.svg?branch=master)](https://travis-ci.org/mkay581/modal-js)\n[![npm version](https://badge.fury.io/js/modal-js.svg)](https://badge.fury.io/js/modal-js)\n[![Bower version](https://badge.fury.io/bo/modal-module.svg)](https://badge.fury.io/bo/modal-module)\n\n# Modal\n\nCreate simple (or advanced), high-performant modals with minimal javascript and markup.\nThis library is built using native vanilla javascript, so it is lightweight and super fast.\n\n## Benefits\n\n* Hide and show modals in any area in the DOM\n* Respond to events when modals are shown and hidden\n* Respects CSS transitions and delays\n* Fully customizable modal containers and content\n* Supports multiple modals and modals inside of a modals.. weee!\n\n## Usage\n\nCreate one or more modals with a few lines of javascript. With your html and css setup correctly, you can do:\n\n```javascript\nlet html = '\u003cdiv class=\"my-modal\"\u003eMy Modal Content\u003c/div\u003e';\nlet modal = new Modal(html, {\n    containerEl: document.getElementById('modals-container'),\n    activeClass: 'modal-active'\n});\n\nmodal.show(); // show the modal\nmodal.hide(); // hide the modal\n```\n\n### Respond when modal is shown (or hidden)\n\nThe library respects any css transitions you add to show and hide your modal.\nSo given the following css:\n\n```css\n.my-modal {\n    visibility: hidden;\n    opacity: 0;\n    transition: opacity 1000ms linear;\n}\n\n.my-modal.modal-active {\n    visibility: visible;\n    opacity: 1;\n}\n```\n\nYou can do things after the modal fades in:\n\n```javascript\nmodal.show().then(function () {\n    // fired after 1000 milliseconds, when the modal has been fully faded in\n});\n```\n\n## Examples\n\nMore details and example can be found [here](examples/modal.html).\n\n\n## Notes\n\n* Always try to place your modals in a high DOM level to prevent other elements from inadvertently\naffecting the modal's appearance and/or functionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcellus%2Fmodal-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkcellus%2Fmodal-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcellus%2Fmodal-js/lists"}