{"id":13451939,"url":"https://github.com/rstacruz/remount","last_synced_at":"2025-05-15T18:03:11.960Z","repository":{"id":37692797,"uuid":"144975898","full_name":"rstacruz/remount","owner":"rstacruz","description":"Mount React components to the DOM using custom elements","archived":false,"fork":false,"pushed_at":"2023-03-08T07:41:22.000Z","size":1956,"stargazers_count":720,"open_issues_count":11,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T21:47:03.632Z","etag":null,"topics":["custom-elements","onmount","react","shadow-dom","web-components"],"latest_commit_sha":null,"homepage":"","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/rstacruz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-16T10:57:39.000Z","updated_at":"2025-01-24T12:53:56.000Z","dependencies_parsed_at":"2024-01-09T11:17:47.275Z","dependency_job_id":null,"html_url":"https://github.com/rstacruz/remount","commit_stats":{"total_commits":279,"total_committers":6,"mean_commits":46.5,"dds":0.06810035842293904,"last_synced_commit":"3c876b219cc3aa3a7055237ab59756e7519c817e"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fremount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fremount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fremount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fremount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstacruz","download_url":"https://codeload.github.com/rstacruz/remount/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737788,"owners_count":20987721,"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","onmount","react","shadow-dom","web-components"],"created_at":"2024-07-31T07:01:07.539Z","updated_at":"2025-04-07T22:08:51.921Z","avatar_url":"https://github.com/rstacruz.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Libraries"],"sub_categories":["Integrations"],"readme":"\u003cbr\u003e\n\n\u003cp align='center'\u003e\u003ca href='https://github.com/rstacruz/remount'\u003e\u003cimg src='docs/images/remount.png' width='450'\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003ch1 align='center'\u003eRemount\u003c/h1\u003e\n\n\u003cp align='center'\u003e\n\u003ca href='https://npmjs.com/package/remount'\u003e\u003cimg src='https://img.shields.io/npm/v/remount.svg?colorA=234\u0026colorB=83e' alt='version'\u003e\u003c/a\u003e\n\u0026nbsp;\n\u003ca href='https://bundlephobia.com/result?p=remount'\u003e\u003cimg src='https://img.shields.io/bundlephobia/minzip/remount.svg?colorA=345\u0026colorB=89a\u0026label=size' alt='Bundle size'\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align='center'\u003eUse your React components anywhere in your \u003cbr\u003e HTML as web components (custom elements).\u003c/p\u003e\n\n\u003cp align='center'\u003e\n\u003ca href='https://codepen.io/rstacruz/pen/EpBZRv?editors=1010'\u003eDemo\u003c/a\u003e ⚡ \u003ca href='https://github.com/rstacruz/remount#remount'\u003eDocs\u003c/a\u003e\n\u003cbr\u003e\n\u003cem\u003e2kb gzip'd \u0026nbsp;\u0026middot;\u0026nbsp; No dependencies \u0026nbsp;\u0026middot;\u0026nbsp; IE support\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n## Installation\n\nRemount is available through the npm package repository. React 18 is required.\n\n```sh\n# npm\nnpm install remount react react-dom\n# yarn\nyarn add remount react react-dom\n```\n\n- Via yarn: `yarn add remount`\n- or npm: `npm install remount`\n\n## Usage\n\nLet's start with any React component. Here's one:\n\n```js\nconst Greeter = ({ name }) =\u003e {\n  return \u003cdiv\u003eHello, {name}!\u003c/div\u003e\n}\n```\n\nUse _define()_ to define custom elements. Let's define a `\u003cx-greeter\u003e` element:\n\n```js\nimport { define } from 'remount'\n\ndefine({ 'x-greeter': Greeter })\n```\n\nYou can now use it anywhere in your HTML! :boom:\n\n```html\n\u003cx-greeter props-json='{\"name\":\"John\"}'\u003e\u003c/x-greeter\u003e\n```\n\n⚡ **[API documentation →](docs/api.md)**\n\n## Use cases\n\nSome ideas on why you might want to consider Remount for your project:\n\n|                                                               |                                                                                                                                                                                                            |\n| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| \u003cbr\u003e\u003cimg src='./docs/images/non-spa.png' width='400'\u003e\u003cbr\u003e\u003cbr\u003e | ✨ **Adding React to non-SPA apps** \u003cbr\u003e You can use React components on any page of a \"regular\" HTML site. Great for adding React to apps built on Rails or Phoenix.                                      |\n|                                                               |                                                                                                                                                                                                            |\n| \u003cbr\u003e\u003cimg src='./docs/images/interop.png' width='400'\u003e\u003cbr\u003e\u003cbr\u003e | 💞 **Interop with other frameworks** \u003cbr\u003e Remount lets you use your React components just like any other HTML element. This means you can use React with Vue, Angular, or any other DOM library/framework. |\n\n## More features\n\n- JSON props (eg, `\u003cx-greeter props-json=\"{...}\"\u003e`) ([docs](./docs/api.md))\n- Named attributes (eg, `\u003cx-greeter name=\"John\"\u003e`) ([docs](./docs/api.md))\n- Uses Custom Elements API (when available)\n- Fallback to compatible API for other browers\n- Shadow DOM mode (when available)\n\n## Browser support\n\nRemount supports all browsers that React 18 supports.\n\nCustom Elements API\u003csup\u003e[#][custom-elements]\u003c/sup\u003e (\"Web Components\") will be used if it's available (Chrome/67+), and will fallback to a compatible API otherwise.\n\n⚡ [Browser support docs →](./docs/browser_support.md)\n\n[custom-elements]: https://caniuse.com/#search=custom%20elements\n\n## Documentation\n\n- [API documentation](./docs/api.md)\n- [Builds](./docs/builds.md) \u0026mdash; ES2015+ and ES Module builds are also provided.\n- [FAQ and Troubleshooting](./docs/faq.md) \u0026mdash; Start here if you find any issues.\n- [Comparison with alternatives](./docs/comparison.md)\n- [Browser support](./docs/browser_support.md)\n\n## Thanks\n\n**remount** © 2022, Rico Sta. Cruz. Released under the [MIT] License.\u003cbr\u003e\nAuthored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).\n\n\u003e [ricostacruz.com](http://ricostacruz.com) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e GitHub [@rstacruz](https://github.com/rstacruz) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e Twitter [@rstacruz](https://twitter.com/rstacruz)\n\n[mit]: http://mit-license.org/\n[contributors]: http://github.com/rstacruz/remount/contributors\n\n\u003cbr\u003e\n\n[![](https://img.shields.io/github/followers/rstacruz.svg?style=social\u0026label=@rstacruz)](https://github.com/rstacruz) \u0026nbsp;\n[![](https://img.shields.io/twitter/follow/rstacruz.svg?style=social\u0026label=@rstacruz)](https://twitter.com/rstacruz) \u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstacruz%2Fremount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstacruz%2Fremount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstacruz%2Fremount/lists"}