{"id":15099256,"url":"https://github.com/cradlecms/component-popup","last_synced_at":"2026-02-18T10:32:05.873Z","repository":{"id":254826019,"uuid":"847594475","full_name":"CradleCMS/component-popup","owner":"CradleCMS","description":"Popup web component","archived":false,"fork":false,"pushed_at":"2024-08-26T08:48:23.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T17:45:32.108Z","etag":null,"topics":["web-component","web-components"],"latest_commit_sha":null,"homepage":"https://cradlecms.com","language":"Liquid","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CradleCMS.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T07:01:38.000Z","updated_at":"2024-08-26T08:51:41.000Z","dependencies_parsed_at":"2024-08-26T12:21:12.061Z","dependency_job_id":null,"html_url":"https://github.com/CradleCMS/component-popup","commit_stats":null,"previous_names":["cradlecms/component-popup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CradleCMS%2Fcomponent-popup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CradleCMS%2Fcomponent-popup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CradleCMS%2Fcomponent-popup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CradleCMS%2Fcomponent-popup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CradleCMS","download_url":"https://codeload.github.com/CradleCMS/component-popup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245855189,"owners_count":20683469,"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":["web-component","web-components"],"created_at":"2024-09-25T17:08:48.091Z","updated_at":"2025-10-11T16:12:34.253Z","avatar_url":"https://github.com/CradleCMS.png","language":"Liquid","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Popup web component\n\nPopup web component for Cradle CMS.\n\n1. Add the file in the `components` folder.\n2. Include in layout file `theme.liquid` or in a specific template such as `page.liquid` with `{% component 'popup' %}`. \n3. Add a button that opens the popup `\u003cbutton id=\"\u003cbutton-id\u003e\"\u003eContact\u003c/button\u003e`.\n4. Add the `\u003cpop-up\u003e` element with attributes and content.\n\n## The attributes and content\n\n### Connect with button\nSet target for the button with replacing `\u003cbutton-id\u003e`. \n\n### Attributes\n* Width - popupwidth : Add a number in px , if removed the default is 400px.\n* Background - popupbg : Sets the background color for the whole popup but in practise only for the header, if removed dafault is white.\n* Content background : Sets the background color for the content/main part.\n\n### Content\nThere is two content slots: header and main, fill with the desired content. With Cradle CMS it is possible to build a form and include the html with `{% form '\u003cform-handle\u003e' %}{% endform %}`\n\n```\n\u003cpop-up target=\"\u003cbutton-id\u003e\" popupwidth=\"\u003cset width in px, default is 400px\u003e\" popupbg=\"background color for the popup header, default is white\" mainbg=\"background color for the main content, default is white\" \u003e\n    \u003cdiv slot=\"header\"\u003e\n      \u003c!-- replace with content for header --\u003e\n    \u003c/div\u003e\n    \u003cdiv slot=\"main\"\u003e\n      \u003c!-- replace with content for main body of popup --\u003e\n    \u003c/div\u003e\n\u003c/pop-up\u003e\n```\n## Considerations\nThis component is not done with the html \u003cdialog\u003e element, which would be perfect, as the compability is not there yet for all webbrowsers used in the wild.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcradlecms%2Fcomponent-popup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcradlecms%2Fcomponent-popup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcradlecms%2Fcomponent-popup/lists"}