Production-Focused Resource

Web Components & Framework-Agnostic UI Architecture

A practical, implementation-heavy reference for UI engineers building resilient component systems on native web platform primitives. Every page is grounded in the normative specification, illustrated with hand-authored diagrams, and written around code you can run rather than pseudocode you cannot.

The library now spans 85 pages across three sections — component architecture, styling and theming, and distribution and testing — organised from broad overviews down to single-problem deep dives. Each section page links to its topics; each topic links to the specific failures it covers.

Recent additions cover slot composition and the flattened tree, observer teardown and memory safety, container queries inside shadow trees, custom states as a styling channel, and the manifest and type declarations a published component package needs.

Lifecycle Callbacks Deep Dive

What each reaction may assume, why a move runs two of them, and coordinating components without relying on order.

Form-Associated Custom Elements

Submitting a value, declaring validity, and answering the four form lifecycle callbacks a native control handles for free.

CSS Scoping in Shadow DOM

The selector surface a shadow tree actually has, cascade layers inside it, and why tree order decides ties.

Part & Slotted Selectors

Choosing between a part, a token, and nothing — plus forwarding parts through nested components.

Packaging & Publishing

The exports map as public API, condition order, and the sideEffects entry that keeps registrations alive.

Contract & Visual Testing

What each test layer can prove, why a DOM emulation cannot answer most of it, and deterministic screenshots.