Web Components is a collection of browser specifications that provide a standard component model for the Web, consisting of several interrelated standards maintained across different standards bodies.
Web Components address the need for reusable, encapsulated UI components in the browser by combining multiple complementary specifications. Shadow DOM provides encapsulation and style scoping for component internals. Custom Elements allow developers to define their own HTML elements with custom behavior. HTML Templates provide inert markup that can be cloned and inserted into the DOM. CSS Scoping and CSS Shadow Parts specifications enable styling of encapsulated components. Modules specifications allow components to import JSON, CSS, and HTML resources as dependencies.
Developers should adopt Web Components when building reusable UI components intended for broad compatibility across web applications. The approach suits projects that need encapsulation, style isolation, and the ability to compose components without framework dependencies. Web Components are particularly valuable for component libraries and design systems that must work across different application contexts. The specifications have been upstreamed into the HTML Standard, DOM Standard, and CSS Working Group specifications, meaning they are maintained as part of the core web platform rather than as separate proposals.
The project functions as a coordination point for Web Components work distributed across multiple standards bodies. Specification work for Shadow DOM and Custom Elements has been fully integrated into the HTML and DOM Standards, with ongoing maintenance occurring in those repositories. HTML Modules specification work is being incubated in the WHATWG HTML repository. CSS-related enhancements for Web Components are developed through the CSS Working Group. The repository maintains explainers and proposals for emerging features while directing issue reporters to file concerns in the most specific standards repository relevant to each component.