{"id":24383259,"url":"https://github.com/firstandthird/simple-domodal","last_synced_at":"2025-10-28T15:07:28.608Z","repository":{"id":27160173,"uuid":"112710256","full_name":"firstandthird/simple-domodal","owner":"firstandthird","description":"Simple modal using Domodule","archived":false,"fork":false,"pushed_at":"2022-12-06T21:55:30.000Z","size":647,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-04T09:40:27.699Z","etag":null,"topics":[],"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/firstandthird.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":"2017-12-01T07:42:24.000Z","updated_at":"2019-07-02T08:31:28.000Z","dependencies_parsed_at":"2023-01-14T06:07:36.871Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/simple-domodal","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fsimple-domodal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fsimple-domodal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fsimple-domodal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fsimple-domodal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/simple-domodal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243258504,"owners_count":20262301,"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":"2025-01-19T10:14:01.614Z","updated_at":"2025-10-17T23:12:07.692Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Domodal\n\n![npm](https://img.shields.io/npm/v/simple-domodal.svg)\n\nSimple modal using Domodule\n\n## Installation\n\n```sh\nnpm install simple-domodal\n```\n\n## Usage\n\n### JavaScript\n\n```js\nimport 'simple-domodal';\n// or\nimport SimpleModal from 'simple-domodal';\n```\n\n### HTML\n\n```html\n...\n\n\u003cbody\u003e\n  \u003cbutton aria-controls=\"some-id\"\u003eThis aria-controls will open the modal\u003c/button\u003e\n\n  \u003cdiv id=\"some-id\"\n       class=\"modal\"\n       data-module=\"SimpleModal\"\n       data-module-auto-open=\"false\"\n       data-module-closable=\"true\"\n       role=\"dialog\"\n       tabindex=\"-1\"\u003e\n\n    \u003cdiv class=\"modal-content padding-md text-center\" data-name=\"modal\"\u003e\n      \u003cbutton class=\"modal-close\" data-action=\"close\" aria-label=\"Close modal\"\u003e\n        \u003cspan aria-hidden=\"true\"\u003e×\u003c/span\u003e\n      \u003c/button\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\n  \u003cscript src=\"simple-domodal.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n```\n\n## Events\n\nCustom events are fired on open/close and you can fire an event to open the modal.\n\n| Event          | Where                                       | When            |\n|----------------|---------------------------------------------|-----------------|\n| `modal:reveal` | If fired on the modal, the modal will open. |                 |\n| `modal:opened` | On the modal.                               | On modal open.  |\n| `modal:closed` | On the modal.                               | On modal close. |\n\n## Options\n\n| Option     | Default       | Action                                                 |\n|------------|---------------|--------------------------------------------------------|\n| `autoOpen` | `false`       | If `true` the modal will open on pageload.             |\n| `closable` | `true`        | If `true` modal won't disappear on close.              |\n| `focus`    | Modal Element | Element that will gain focus once the modal is opened. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fsimple-domodal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fsimple-domodal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fsimple-domodal/lists"}