glossary2 min read

Web Components

Web Components let you create reusable custom HTML elements with encapsulated styles and behavior.

Web Components are a set of browser-native APIs for creating custom, reusable HTML elements: Custom Elements (define new tags like <my-button>), Shadow DOM (encapsulate styles so they do not leak), HTML Templates (<template> and <slot> for markup reuse). Unlike React or Vue components, Web Components work in any framework or no framework at all. They are supported by all modern browsers natively.