Do web components have a future if nobody is writing them? | Read the Tea Leaves
Here is a summary of the blog post by Nolan Lawson , "Do web components have a future if nobody is writing them?":
Main Thesis
Nolan explores how the rise of AI agentic coding ("vibe-coding") challenges the core value proposition of web components. Originally designed for an era where human developers typed boilerplate HTML by hand and relied heavily on code reuse, web components struggle to find a compelling place in a world where AI can effortlessly generate or throw away UIs from scratch.
Key Takeaways
- The "Use the Platform" Misconception: Lawson notes that the mantra "use the platform" is often conflated with using web components, largely because it was popularized by Google’s early framework,
. However, modern platform wins are mostly driven by native HTML/CSS improvements (like scroll-driven animations and Open UI features), not custom elements.Polymer - Absence in AI Guidance: An analysis of Google's
tool (skills for AI coding agents) shows that web components were initially absent and remain an afterthought. The guidance largely encourages agents to question whether a custom element is even necessary.Modern Web Guidance - Weakened Value Proposition for Reuse: In an AI-driven workflow where rewriting code or generating boilerplate is cheap, the traditional pitch of "build once on a standard to reuse everywhere" loses its economic edge. Furthermore, the industry's shift toward "DIY" component systems (like
) bypasses shadow DOM and reflected attributes.shadcdn - Potential Lifelines for Web Components:
- Micro-frontends & Sandboxing: Web components (or alternatively,
iframes) can act as boundaries to prevent AI-generated UI components from clobbering each other's styles and globals. - Standalone Client Libraries: Distributing complex, standalone widgets that manage their own internal state and data (like Lawson's
) still makes sense as a framework-agnostic package.element
- The Ultimate Legacy: Even if web components fade into niche infrastructure, Lawson argues they have already achieved an unambiguous victory: "explaining the platform." They bridged the gap between userland and native browser internals (such as user-agent shadow DOM in
<video controls>), directly influencing modern browser standards like customizable<select>elements and popovers via the .Open UI project