Web components are the browser's own component model: you define a new HTML tag once and use it in any page, with any framework or none. The term covers three standards. Custom elements register a JavaScript class for a hyphenated tag name; shadow DOM gives the element a private subtree with scoped styles; templates and slots supply the markup and place the element's children. <template> and <slot> introduced the last two, so this section covers the lifecycle, server-rendered shadow roots and the libraries that remove the boilerplate.
Components built this way outlive framework fashions: GitHub 29 , Adobe (Spectrum Web Components) and Microsoft (Fluent UI Web Components) ship them, and all major frameworks can consume them; React 19 7,897 passes every test in the Custom Elements Everywhere suite. Attaching Shadow DOM covers the imperative attachShadow() API.