๐ฐweb component
isolated pieces (kinds of blocks) with which a user interface (UI) can communicate with other elements, through properties and events.
browser โฉ web component
web components are implemented as a custom element that uses a <template> tag for efficiency and a shadow root for encapsulation.
define their own HTML tag names, with the important restriction that those tag names must include a hyphen.
cannot be defined with self-closing tags.
some web components are written to:
expect children.
not expect children (and won't display them)
optionally accept specially labelled children that will appear in named "slots".
popular frameworks๏ผAngular, React, Vue.js
cheatsheet
๐ html
๐ js
Last updated