{"id":21721638,"url":"https://github.com/polydile/dile-modal","last_synced_at":"2026-01-14T15:28:34.568Z","repository":{"id":34923237,"uuid":"190600637","full_name":"Polydile/dile-modal","owner":"Polydile","description":"Web Component to implement a Modal box. Based on LitElement","archived":true,"fork":false,"pushed_at":"2025-02-19T18:14:46.000Z","size":3954,"stargazers_count":7,"open_issues_count":22,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T16:48:15.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dile-modal.polydile.com","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/Polydile.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":"2019-06-06T14:59:50.000Z","updated_at":"2025-02-19T18:15:33.000Z","dependencies_parsed_at":"2023-01-15T10:30:38.481Z","dependency_job_id":null,"html_url":"https://github.com/Polydile/dile-modal","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Polydile/dile-modal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polydile%2Fdile-modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polydile%2Fdile-modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polydile%2Fdile-modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polydile%2Fdile-modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polydile","download_url":"https://codeload.github.com/Polydile/dile-modal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polydile%2Fdile-modal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265801585,"owners_count":23830438,"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":"2024-11-26T02:18:12.142Z","updated_at":"2026-01-14T15:28:34.533Z","avatar_url":"https://github.com/Polydile.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moved!\n\n**This package has moved** and is now available at [@dile/ui](https://github.com/Polydile/dile-components). Please update your dependencies. This repository is no longer maintained. You can read the documentation at [Dile Components](https://dile-components.com/).\n\n# dile-modal\n\nThis is a Web Component to implement a modal box, based on LitElement.\n\n[Go to demos page](https://dile-modal.polydile.com)\n\n# Use\n\nInstall it from npm:\n\n```\nnpm i dile-modal\n```\n\nPlace the script In your HTML page or include the dile-modal.js file in your JS bundle. After that you can use the dile-modal tag, like this:\n\n```\n\u003cdile-modal id=\"myModal\"\u003e\n  \u003cp\u003e\n    Lorem, ipsum dolor sit...\n  \u003c/p\u003e\n\u003c/dile-modal\u003e \n```\n\nWhatever you place inside the ```\u003cdile-modal\u003e``` tag will be the content displayed when the modal box opens.\n\nWhen needed, you may use the ```open()``` method to open the modal box interface, and ```close()``` to close it. \n\n```\ndocument.getElementById(\"myModal\").open();\n```\n\nOther posibility in order to open or close the modal box is to set the boolean ```opened``` attribute.\n\n## Properties\n\n- **opened**: Bolean property used to change the modal state, false is closed / true means open.\n- **showCloseIcon**: Boolean property to tell the modal box you want a close icon to be displayed.\n- **blocking**: Boolean property to configure the modal box as a bloking interface. If true the modal box blocks the screen. That is, when you click in the background layer, the modal box do not close.\n\n## Methods\n\n- **open**: Use it to open the modal box\n- **close**: Use it to close the modal box\n\n## Events\n\n- **dile-modal-closed**: Dispatched when the modal box becomes closed, in case you are called the close() method, or clicked in the background modal, or by the close icon.\n- **dile-modal-background-closed**: Dispatched when the modal box is closed because the user clicks in the background layer.\n\n## Style customization\n\nYou can customize the modal box interface by using the CSS custom properties bellow.\n\nCustom property | Description | Default\n----------------|-------------|---------\n--dile-modal-background-color | Modal layer background color | rgba(30,30,30, 0.8)\n--dile-modal-z-index | Modal layer z-index | 100\n--dile-modal-content-z-index | Content layer z-index | 101\n--dile-modal-width | Content layer width | 280px\n--dile-modal-min-width | Content layer min width | 250px\n--dile-modal-max-width | Content layer max width | 100vw\n--dile-modal-height | Conten layer height | auto\n--dile-modal-min-height | Content layer max height | auto\n--dile-modal-max-height | Content layer max height | 100vh\n--dile-modal-content-background-color | Content layer background color | #fff\n--dile-modal-content-padding | Content layer padding | 1em\n--dile-modal-border-radius | Content layer border radius | 15px\n--dile-modal-content-shadow-displacement | content layer shadow offset | 6px\n--dile-modal-content-shadow-blur | Content layer shadow blur | 16px\n--dile-modal-content-shadow-color | Content layer shadow color | #000\n--dile-modal-close-icon-color | Close icon color | #888\n--dile-modal-close-icon-size | Close icon size | 24px\n--dile-modal-animation-duration | Duration of the opacity modal animation | 0.3s\n--dile-modal-close-icon-top | Top position applied to the close icon | 5px\n--dile-modal-close-icon-right | Right position applied to the close icon | 18px\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolydile%2Fdile-modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolydile%2Fdile-modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolydile%2Fdile-modal/lists"}