{"id":17418976,"url":"https://github.com/jscissr/react-polymer","last_synced_at":"2025-09-14T03:32:10.313Z","repository":{"id":35564068,"uuid":"39836029","full_name":"jscissr/react-polymer","owner":"jscissr","description":"Use Polymer elements in React","archived":false,"fork":false,"pushed_at":"2019-02-09T11:15:07.000Z","size":619,"stargazers_count":133,"open_issues_count":4,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-08T16:11:25.338Z","etag":null,"topics":["polymer","polymer-element","react"],"latest_commit_sha":null,"homepage":"https://jscissr.github.io/react-polymer/demo/","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/jscissr.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":"2015-07-28T13:39:10.000Z","updated_at":"2024-11-28T16:31:26.000Z","dependencies_parsed_at":"2022-09-18T00:22:17.583Z","dependency_job_id":null,"html_url":"https://github.com/jscissr/react-polymer","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/jscissr/react-polymer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscissr%2Freact-polymer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscissr%2Freact-polymer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscissr%2Freact-polymer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscissr%2Freact-polymer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jscissr","download_url":"https://codeload.github.com/jscissr/react-polymer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscissr%2Freact-polymer/sbom","scorecard":{"id":537811,"data":{"date":"2025-08-11","repo":{"name":"github.com/jscissr/react-polymer","commit":"738c4245df20434fe74d2c2683757c9c4f6ebebf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T07:26:07.138Z","repository_id":35564068,"created_at":"2025-08-20T07:26:07.138Z","updated_at":"2025-08-20T07:26:07.138Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275058126,"owners_count":25398168,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["polymer","polymer-element","react"],"created_at":"2024-10-17T02:10:30.433Z","updated_at":"2025-09-14T03:32:10.044Z","avatar_url":"https://github.com/jscissr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-polymer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url]\n\n[travis-image]: https://img.shields.io/travis/jscissr/react-polymer/master.svg\n[travis-url]: https://travis-ci.org/jscissr/react-polymer\n[npm-image]: https://img.shields.io/npm/v/react-polymer.svg\n[npm-url]: https://npmjs.org/package/react-polymer\n[downloads-image]: https://img.shields.io/npm/dm/react-polymer.svg\n\n*Use Polymer elements in React*\n\nreact-polymer now supports Polymer 2.0! If you need to use Polymer 1.0 please use v3\n\nSince [this change](https://github.com/facebook/react/pull/1551) you can put\nPolymer elements into React components and at first glance it just works:\n\n```js\n\u003cpaper-button raised\u003eclick me\u003c/paper-button\u003e\n```\n\nHowever, when you then start using custom attributes and events, it doesn't work\nanymore.\n\nNow you need react-polymer:\n\n```js\nimport reactPolymer from 'react-polymer' // Must be imported before React\nimport React from 'react'\n\nreactPolymer.registerAttribute('drawer') // Note: this is only needed for custom attributes on standard elements like div\nreactPolymer.registerAttribute('main')\nreactPolymer.registerEvent('color-picker-selected', 'onColorPickerSelected')\n\n\n\u003cpaper-drawer-panel\u003e\n  \u003cdiv drawer\u003e Drawer panel... \u003c/div\u003e\n  \u003cdiv main\u003e Main panel... \u003c/div\u003e\n\u003c/paper-drawer-panel\u003e\n\u003cpaper-swatch-picker onColorPickerSelected={this.colorChange} /\u003e\n```\n\nAlso, all the form elements don't work like the native ones.\nThat's because React internally has wrappers to make controlled components.\nWe have our own wrapper for the Polymer form elements:\n\n```js\nimport reactPolymer from 'react-polymer'\nimport React from 'react'\nimport {\n  PaperCheckbox,\n  PaperToggleButton,\n  PaperInput,\n  PaperTextarea,\n  IronAutogrowTextarea,\n  PaperSlider,\n  PaperMenu,\n  PaperListbox,\n  PaperRadioGroup,\n  PaperTabs,\n  IronSelector\n} from 'react-polymer/input'\n\n\n\u003cPaperInput value={this.state.value} onChange={this.valueChanged} /\u003e\n\u003cPaperToggleButton checked={this.state.checked} onChange={this.checkedChange} /\u003e\n```\n\nAnother problem that is solved automatically by react-polymer is that\n`className` doesn't work on Polymer elements.\n\nSee [more examples](https://github.com/jscissr/react-polymer/blob/master/demo/index-source.js).\n\n## ES6\n\nThis module uses some ES6 features, so you should run it through a transpiler like [babel](https://babeljs.io/). If you use [browserify](http://browserify.org/), you don't need to do anything. If you use [webpack](https://webpack.github.io/), you have to [enable transpiling](https://webpack.js.org/loaders/#transpiling), but replace the default `exclude` config with `exclude: s =\u003e /node_modules/.test(s) \u0026\u0026 !/react-polymer/.test(s)`. (If you know how to make webpack do this automatically like it works with browserify, please tell me!)\n\n## Testing\n\n```shell\nnpm install\nbower install\nnpm run test-local\n```\n\n## Caveats\n\n`gold-*` elements are not yet supported.\n\nPolymer elements can have properties with `notify` attribute, which trigger\n`{property}-changed` events. However these events don't bubble, so you have to\nmanually call `addEventListener` yourself.\n\nThis module does a lot of monkey patching on internal APIs of react-dom, so it only works with React 15. It is recommended to pin React to a fixed version, and always test new versions before updating. There is no guarantee that it will still work, even after patch-level updates of React.\n\n## Notes\n\nA React issue that might simplify this once solved:\n\n- https://github.com/facebook/react/issues/4751\n\n## Similar Libraries\n\nFor mixing Polymer and React, there is [Maple](https://github.com/Wildhoney/Maple.js), which doesn't seem to be maintained anymore. However, if all you are looking for is a way to incorporate pre-built Material Design components into React, there are also [Material-UI](https://github.com/callemall/material-ui) and [React-Materialize](https://github.com/react-materialize/react-materialize).\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjscissr%2Freact-polymer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjscissr%2Freact-polymer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjscissr%2Freact-polymer/lists"}