All Projects → rstacruz → Remount

rstacruz / Remount

Licence: mit
Mount React components to the DOM using custom elements

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Remount

element
Fast and simple custom elements.
Stars: ✭ 65 (-87.55%)
Mutual labels:  web-components, custom-elements, shadow-dom
svelte-webcomponents
A ready-to-use project template to build custom elements (web components) with Svelte 3 with support and examples for web components, jest, sass, nested components with props, eslinting, stylelinting, Github actions, propagating custom events from shadow-DOM to real-DOM etc.
Stars: ✭ 22 (-95.79%)
Mutual labels:  web-components, custom-elements, shadow-dom
Xy Ui
🎨面向未来的原生 web components UI组件库
Stars: ✭ 603 (+15.52%)
Mutual labels:  web-components, custom-elements, shadow-dom
Nutmeg
Build, test, and publish vanilla Web Components with a little spice
Stars: ✭ 111 (-78.74%)
Mutual labels:  web-components, custom-elements, shadow-dom
Shadow Dom In Depth
Everything you need to know about Shadow DOM
Stars: ✭ 191 (-63.41%)
Mutual labels:  web-components, custom-elements, shadow-dom
Omi
Front End Cross-Frameworks Framework - 前端跨框架跨平台框架
Stars: ✭ 12,153 (+2228.16%)
Mutual labels:  web-components, custom-elements, shadow-dom
Custom Elements Ts
Create native custom elements using Typescript
Stars: ✭ 52 (-90.04%)
Mutual labels:  web-components, custom-elements, shadow-dom
grid-container
A grid for the future, CSS Grid Layout + Web Components (Custom Elements v1 + Shadow DOM v1)
Stars: ✭ 51 (-90.23%)
Mutual labels:  web-components, custom-elements, shadow-dom
focus-trap
A lightweight web component that traps focus within a DOM node
Stars: ✭ 44 (-91.57%)
Mutual labels:  web-components, custom-elements, shadow-dom
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (-14.75%)
Mutual labels:  web-components, custom-elements
ionic-custom-components
🌈 Ionic Tutorial: Mastering Web Components in Ionic Framework. This repo is an Ionic project showcasing Angular custom components and Stencil custom web components.
Stars: ✭ 30 (-94.25%)
Mutual labels:  web-components, shadow-dom
Monogatari
Monogatari is a simple web visual novel engine, created to bring Visual Novels to the web.
Stars: ✭ 357 (-31.61%)
Mutual labels:  web-components, custom-elements
web-components-tutorial
HTML Web Component using Vanilla JavaScript
Stars: ✭ 38 (-92.72%)
Mutual labels:  web-components, shadow-dom
custom-elements-manifest
Custom Elements Manifest is a file format that describes custom elements in your project.
Stars: ✭ 81 (-84.48%)
Mutual labels:  web-components, custom-elements
bui
‹b› Web components for creating applications – built by Blackstone Publishing using lit-html and lit-element
Stars: ✭ 29 (-94.44%)
Mutual labels:  web-components, custom-elements
cwco
Powerful and Fast Web Component Library with a Simple API
Stars: ✭ 27 (-94.83%)
Mutual labels:  web-components, custom-elements
ascii-image
Web Component that displays an image as ASCII art
Stars: ✭ 15 (-97.13%)
Mutual labels:  web-components, custom-elements
storify
Instagram/Whatsapp stories clone built on Web Components and Web Animations API. 🔥
Stars: ✭ 64 (-87.74%)
Mutual labels:  web-components, custom-elements
anywhere-webcomponents
A UI work in progress based on custom elements (web components) for use in anywhere.
Stars: ✭ 17 (-96.74%)
Mutual labels:  web-components, custom-elements
Atomico
Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.
Stars: ✭ 481 (-7.85%)
Mutual labels:  web-components, shadow-dom


Remount

Travis CI   version   Bundle size

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

DemoDocs
2kb gzip'd  ·  No dependencies  ·  IE support



Installation

Remount is available through the npm package repository.

  • Via yarn: yarn add remount
  • or npm: npm install remount

Usage

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

const Greeter = ({ name }) => {
  return <div>Hello, {name}!</div>
}

Use define() to define custom elements. Let's define a <x-greeter> element:

import { define } from 'remount'

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

You can now use it anywhere in your HTML! 💥

<x-greeter props-json='{"name":"John"}'></x-greeter>

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, <x-greeter props-json="{...}">) (docs)
  • Named attributes (eg, <x-greeter name="John">) (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 support, which includes IE11. Legacy IE support (IE9) is available using polyfills.

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

Thanks

remount © 2018, 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


 

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].