Web components

Web components are a declared standard of features that allow developers to extend the HTML structure with new elements, as well as encapsulate styles and behavior. One of the main reasons developers choose a modern component-based framework is to have the ability to decompose their app into smaller units, namely components.

Web components are comprised of key features that enable this scenario:

  • Custom elements enable extending HTML with new elements.
  • Shadow DOMs allow encapsulation of DOM and styles.
  • HTML import supports external sources.
  • HTML templates let you construct repeatable structures at will.

The fact that such capability is now met as standard can be quite revolutionary. Now one can develop such components using ...

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.