Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

remount

> 前端框架
Open source

Mount React components to the DOM using custom elements

720 stars0 likes4 views
WebsiteGitHub

About

Mount React components to the DOM using custom elements

Remount

 

Use your React components anywhere in your HTML as web components (custom elements).

Demo ⚡ Docs

2kb gzip'd  ·  No dependencies  ·  IE support

Installation

Remount is available through the npm package repository. React 18 is required.

bash
# npm
npm install remount react react-dom
# yarn
yarn add remount react react-dom
  • Via yarn: yarn add remount
  • or npm: npm install remount

Usage

Let's start with any React component. Here's one:

javascript
const Greeter = ({ name }) => {
  return 

}

Use define() to define custom elements. Let's define a `` element:

javascript
import { define } from 'remount'

define({ 'x-greeter': Greeter })

You can now use it anywhere in your HTML! :boom:

xml

⚡ API documentation →

Use cases

Some ideas on why you might want to consider Remount for your project:

| ✨ Adding React to non-SPA apps You can use React components on any page of a "regular" HTML site. Great for adding React to apps built on Rails or Phoenix. | | | | |

| Interop with other frameworks 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. |

More features

  • JSON props (eg, ``) (docs)
  • Named attributes (eg, ``) (docs)
  • Uses Custom Elements API (when available)
  • Fallback to compatible API for other browers
  • Shadow DOM mode (when available)

Browser support

Remount supports all browsers that React 18 supports.

Custom Elements API# ("Web Components") will be used if it's available (Chrome/67+), and will fallback to a compatible API otherwise.

⚡ Browser support docs →

Documentation

  • API documentation
  • Builds — ES2015+ and ES Module builds are also provided.
  • FAQ and Troubleshooting — Start here if you find any issues.
  • Comparison with alternatives
  • Browser support

Thanks

remount © 2022, Rico Sta. Cruz. Released under the MIT License.

Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

 

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptcustom-elementsonmountreactshadow-dom

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架