Glossary

Web Components

Web Components are a set of native browser APIs for creating custom HTML elements with encapsulated logic and styles — no framework, pure JavaScript.

Three technologies

Example

class MyCard extends HTMLElement {
  connectedCallback() {
    const shadow = this.attachShadow({ mode: 'open' });
    shadow.innerHTML = `
      
      
`; } } customElements.define('my-card', MyCard); // Usage in HTML: // Content here

Web Components vs React/Vue

Web Components are a native standard with no dependencies. React/Vue are libraries with better DX and ecosystem. They can be combined: Lit (Google) simplifies writing Web Components.