{"id":15691468,"url":"https://github.com/anandchowdhary/embed-widget","last_synced_at":"2025-06-15T05:38:01.173Z","repository":{"id":34303147,"uuid":"176480956","full_name":"AnandChowdhary/embed-widget","owner":"AnandChowdhary","description":"🗃 Embeddable widgets for your website","archived":false,"fork":false,"pushed_at":"2024-06-18T01:49:43.000Z","size":134,"stargazers_count":6,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T17:14:44.466Z","etag":null,"topics":["dom","embed","iframe","library","typescript","widget"],"latest_commit_sha":null,"homepage":"https://anandchowdhary.github.io/embed-widget/","language":"TypeScript","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/AnandChowdhary.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-19T09:59:14.000Z","updated_at":"2024-11-02T19:29:23.000Z","dependencies_parsed_at":"2024-10-24T07:45:53.244Z","dependency_job_id":"a2b54aa4-6f3d-4713-9829-1bd4c3faae56","html_url":"https://github.com/AnandChowdhary/embed-widget","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"75647a71e13e70ea771831c819c1814be6118e89"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AnandChowdhary/embed-widget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fembed-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fembed-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fembed-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fembed-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnandChowdhary","download_url":"https://codeload.github.com/AnandChowdhary/embed-widget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fembed-widget/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259927674,"owners_count":22933268,"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":["dom","embed","iframe","library","typescript","widget"],"created_at":"2024-10-03T18:21:45.200Z","updated_at":"2025-06-15T05:38:01.153Z","avatar_url":"https://github.com/AnandChowdhary.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗃 Embed widget\n\nAdd widgets to your website, powered by embedded frames.\n\n## ⭐ Usage\n\nInstall the library as a dependency:\n\n```bash\nnpm install embed-widget\n```\n\nOr, if you're using Yarn:\n\n```bash\nyarn add embed-widget\n```\n\nThen import the library:\n\n```js\nimport widget from \"embed-widget\";\n```\n\nAnd initialize it with an optional selector:\n\n```js\nconst embed = new widget(\"https://example.com\", \"Button text!\");\n```\n\n```html\n\u003cscript src=\"https://unpkg.com/embed-widget\"\u003e\u003c/script\u003e\n```\n\n## 💻 API\n\nYou can use the following methods with a widget:\n\n### Open/close/togggle\n\n```js\nembed.open(); // Open the widget\nembed.close(); // Close the widget\nembed.toggle(); // Open if closed, close if opened\n```\n\n### Remove\n\n```js\nembed.destroy(); // Remove button and frame from DOM\n```\n\n## 🛠️ Development\n\nInstall dependencies:\n\n```bash\nyarn\n```\n\nStart local development server and Prettier watcher:\n\n```bash\nyarn start\n```\n\nCompile Typescript to ES6 before publishing to NPM:\n\n```bash\nyarn build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fembed-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanandchowdhary%2Fembed-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fembed-widget/lists"}