{"id":15937664,"url":"https://github.com/felschr/knockout-web-components","last_synced_at":"2026-02-28T05:20:05.813Z","repository":{"id":84169384,"uuid":"170855980","full_name":"felschr/knockout-web-components","owner":"felschr","description":"A bridge to be able to integrate web components with knockout.js","archived":false,"fork":false,"pushed_at":"2019-02-15T15:21:03.000Z","size":43,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-16T03:51:19.681Z","etag":null,"topics":["custom-elements","knockoutjs","stencil","stenciljs","webcomponents"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/knockout-web-components","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/felschr.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-02-15T11:40:32.000Z","updated_at":"2024-04-27T12:44:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"e95a5752-e882-410c-8096-d65c3d78538c","html_url":"https://github.com/felschr/knockout-web-components","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/felschr%2Fknockout-web-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felschr%2Fknockout-web-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felschr%2Fknockout-web-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felschr%2Fknockout-web-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felschr","download_url":"https://codeload.github.com/felschr/knockout-web-components/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229906086,"owners_count":18142423,"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":["custom-elements","knockoutjs","stencil","stenciljs","webcomponents"],"created_at":"2024-10-07T05:04:33.048Z","updated_at":"2025-10-18T16:08:19.555Z","avatar_url":"https://github.com/felschr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# knockout-web-components\nA bridge to be able to integrate web components with knockout.js\n\nThis project provides a custom bindingHandler to integrate web components into knockout applications more seamlessly.\nIt's compatible with standard web components and thus also allows integration of components from projects like [stencil](http://stenciljs.com).\n\n## Installation\n\n```sh\nnpm i knockout-web-components\n```\n\n## Usage\n\nImport the library in your app:\n```js\nimport \"knockout-web-components\";\n```\nThis will automatically add a new knockout bindingHandler with the name `webcomp`.\n\nNow you can pass properties and event listeners via the data-bind attribute in your templates:\n```html\n\u003cmy-comp data-bind=\"webcomp: { value:'test', sum:0, onInput:() =\u003e { console.log('input') } }\"\u003e\u003c/my-comp\u003e\n```\n\nIf you pass onservables as parameters here they will be unwraped and provided to the web component as plain JSON.\n\nParameters that start with `on` are treated like event listeners and internally it will call `addEventListener` on the web component to listen for events and invoke the function you provided.  \nFor the event registration the `on` prefix will be ignored and instead only the parts after it will be used. This also transforms the first letter of the event name to lowercase.  \nFor example `onInput` would listen for events with the name `input`.\n\n### Stencil\n\nI've created this library as part of my adoption of [stencil](http://stenciljs.com) within my application.  \nIt's a beautiful, lightweight web component compiler that produced 100% standards-based web components that can be used in any framework or no framework at all.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelschr%2Fknockout-web-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelschr%2Fknockout-web-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelschr%2Fknockout-web-components/lists"}