{"id":21884882,"url":"https://github.com/vezwork/modal-css","last_synced_at":"2026-04-09T07:39:36.329Z","repository":{"id":57300273,"uuid":"62200114","full_name":"vezwork/Modal-css","owner":"vezwork","description":"Super small, customizable, and easy modal windows!","archived":false,"fork":false,"pushed_at":"2016-07-12T04:47:43.000Z","size":33,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T22:08:56.326Z","etag":null,"topics":["animation","css","easy","library","modal","simple","umd"],"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/vezwork.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}},"created_at":"2016-06-29T06:07:55.000Z","updated_at":"2016-07-15T19:50:59.000Z","dependencies_parsed_at":"2022-09-07T15:14:00.187Z","dependency_job_id":null,"html_url":"https://github.com/vezwork/Modal-css","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vezwork%2FModal-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vezwork%2FModal-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vezwork%2FModal-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vezwork%2FModal-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vezwork","download_url":"https://codeload.github.com/vezwork/Modal-css/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244893454,"owners_count":20527596,"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":["animation","css","easy","library","modal","simple","umd"],"created_at":"2024-11-28T10:17:11.326Z","updated_at":"2025-12-30T23:54:24.528Z","avatar_url":"https://github.com/vezwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modal-css\n###### Super small (1.5kb minified), customizable, and easy modal windows in js using css animations.\n\n### Beautiful modal windows in 3 easy steps:\n\n1. `npm install modal-css` Then import Modal.Modal using your favorite package manager or simply using `\u003cscript src=\"pathto/Modal.min.js\"\u003e\u003c/script\u003e` \n  \n2. Create a new modal window:\n  ```\n  myModal = new Modal.Modal(); // creates a modal in dom with the id \"modal\".\n  \n  myModal.setAnim(\"cssAnimationIn\", \"cssAnimationOut\"); // specify entry and exit css animation names.\n  \n  myModal.set(\"\u003cb\u003ehey I'm a modal!\u003c/b\u003e\"); // Set the content of the modal window.\n  ```\n  or\n  `myModal = new Modal.Modal().setAnim(\"cssAnimationIn\", \"cssAnimationOut\").set(\"\u003cb\u003ehey I'm a modal!\u003c/b\u003e\");`\n  And make sure you specify an `animation-duration` and some style for your modal in css.\n  \n3. Use `myModal.show();`, `myModal.hide();`, or `myModal.toggle();` to control your modal.\n  for example:\n  ```\n  \u003cbutton onclick=\"myModal.toggle();\"\u003e\n        toggle\n  \u003c/button\u003e\n  ```\n\n### Still not convinced?\ncheck out the [examples folder on github](https://github.com/vezwork/Modal-css/tree/master/ex) for simple useages of modal js.\n\n### Further documentation\nin `new Modal(el)` el can be\n\n1. An html element you wish to add modal capabilities to.\n2. A id for use in css styling.\n3. Nothing which uses the default id \"modal\"\n\nin `myModal.setAnim(animIn, animOut)` if only animIn is specified the exit animation will use the entrance animation reversed.\n\n`myModal.set(content, selector, property)` takes one required argument: the content to insert, and two optional requirements: selector: a css selector which selects a child DOM node of the modal to insert the content into, and propery: the name of the property of the selected DOM to change, defaults to innerHTML. \n\n`myModal.dom` exposes the actual in-document DOM element of the modal.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvezwork%2Fmodal-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvezwork%2Fmodal-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvezwork%2Fmodal-css/lists"}