© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
J. KrauseDeveloping Web Components with TypeScripthttps://doi.org/10.1007/978-1-4842-6840-7_2

2. Making Components

Jörg Krause1  
(1)
Berlin, Berlin, Germany
 

You can create a custom HTML element, described by a class, with its own methods and properties, events and so on. Once a custom element is defined, you can use it on par with built-in HTML elements. These elements are called Web Components.

Basics

Such a simple way to extend the vocabulary of HTML makes your life as a developer easier. The HTML dictionary is rich, but not infinite. There are no <easy-tabs>, <sliding-carousel>, or <beautiful-upload>. Just think of any other tag you might need. But the crucial ...

Get Developing Web Components with TypeScript: Native Web Development Using Thin Libraries 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.