JSFiddle - React, Tailwind, and code Playground

by just_boris

HTML

<hello-world name="%username%"></hello-world>

JavaScript

class HelloWorld extends HTMLElement {
 	constructor() {
	  super();
		this.attachShadow({mode: 'open'});
  }
  
  connectedCallback() {
		this.shadowRoot.innerHTML = `Hello, <strong>${this.getAttribute('name')}</strong> :)`;
  }
}

window.customElements.define('hello-world', HelloWorld);