Answer
Web Components are browser-native reusable elements:
- Custom Elements — define new HTML tags
- Shadow DOM — encapsulated DOM + scoped CSS (not leaked to/from light DOM)
- HTML Templates — inert
<template>cloned into shadow root
Benefits: style isolation, composable widgets, framework-agnostic design systems (e.g. Shoelace, Lit).
Trade-offs: harder global theming, SEO/testing complexity, event retargeting (events appear from host element).