{"id":16594379,"url":"https://github.com/alecaddd/amodal","last_synced_at":"2025-10-12T13:16:06.348Z","repository":{"id":57177354,"uuid":"94039998","full_name":"Alecaddd/aModal","owner":"Alecaddd","description":"Super lightweight and dependency free Modal built in ES6","archived":false,"fork":false,"pushed_at":"2017-09-19T22:34:39.000Z","size":107,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T07:23:54.171Z","etag":null,"topics":["css3","ecmascript2015","es2015","es6","modal"],"latest_commit_sha":null,"homepage":null,"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/Alecaddd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-12T00:20:55.000Z","updated_at":"2024-06-15T00:22:49.000Z","dependencies_parsed_at":"2022-08-28T20:52:16.158Z","dependency_job_id":null,"html_url":"https://github.com/Alecaddd/aModal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Alecaddd/aModal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alecaddd%2FaModal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alecaddd%2FaModal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alecaddd%2FaModal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alecaddd%2FaModal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alecaddd","download_url":"https://codeload.github.com/Alecaddd/aModal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alecaddd%2FaModal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011467,"owners_count":26084947,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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":["css3","ecmascript2015","es2015","es6","modal"],"created_at":"2024-10-11T23:46:04.617Z","updated_at":"2025-10-12T13:16:06.311Z","avatar_url":"https://github.com/Alecaddd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aModal\n\u003e Super lightweight and dependency free Modal built in ES6\n\n[Demo on CodePen](https://codepen.io/Alecaddd/pen/XgdKjB)\n\n## Installation\n\n* Using NPM:\n  ```sh\n  npm install amodal --save\n  ```\n\n* Using Bower:\n  ```sh\n  bower install amodal --save\n  ```\n\n## Include it in your project.\n\n* The script is already compiled via Gulp, browserify and babelify. Use it with Webpack, Browserify, RequireJS or by simply including a `\u003cscript\u003e` tag.\n\n* ES 2015\n  ```javascript\n  import 'amodal';\n  ```\n\n* CommonJS:\n\t```javascript\n\trequire('amodal');\n\t```\n\n* AMD\n\t```javascript\n\trequire(['/node_modules/amodal/dist/index.js']);\n\t```\n\n* Browser\n\t```html\n\t\u003cscript src=\"/node_modules/amodal/dist/index.js\"\u003e\u003c/script\u003e\n\t```\n\nBe sure to include or import the default style\n\n* SCSS\n  ```scss\n  @import '/node_modules/amodal/dist/modal.css';\n  ```\n\n* Browser\n\t```html\n\t\u003clink rel=\"stylesheet\" href=\"/node_modules/amodal/dist/modal.css\"\u003e\n\t```\n\n## Create the Modal HTML\n\n```html\n\u003cdiv id=\"modal-1\" class=\"modal\"\u003e\n\t\u003cdiv class=\"modal-inner\"\u003e\n\t\t\u003ca class=\"js-close-modal\"\u003e\u0026times;\u003c/a\u003e\n\t\t\u003cdiv class=\"modal-content\"\u003e\t  \n\t\t\t\u003ch3\u003eModal Title\u003c/h3\u003e\n\t\t\t\u003cp\u003eThis is my modal content\u003c/p\u003e\t\t\t\n\t\t\u003c/div\u003e\u003c!-- .modal-content --\u003e\n\t\u003c/div\u003e\u003c!-- .modal-inner --\u003e\n\u003c/div\u003e\u003c!-- .modal --\u003e\n```\n\n* **Backdrop Support**: By default, the Modal will automatically close if a click is registered on the backdrop dark overlay area underneath an open modal. You can control this behaviour by setting a boolean data attribute to your modal container.\n\n```html\n\u003cdiv id=\"modal-1\" class=\"modal\" data-backdrop=\"false\"\u003e\n```\n\n## Trigger the Modal\n\n```html\n\u003ca class=\"js-modal\" data-modal=\"modal-1\"\u003eTrigger Modal\u003c/amodal\u003e\n```\n\nThe script is initialized by default and detects every instance of the class `js-modal`.\nYou can hook your trigger to the modal via the data attribute `data-modal` by specifying the modal ID.\n\n## Compatibility\n\nThis script works in all mobile \u0026 desktop browsers, as well as IE 11, 10 (not 9, sorry).\n\n## License\n\n[MIT](https://github.com/Alecaddd/aModal/blob/master/LICENSE.txt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecaddd%2Famodal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falecaddd%2Famodal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecaddd%2Famodal/lists"}