Back to Glossary

What is a Web Component

We all know Lego: it is a modular toy with which you can build an infinite number of forms that are always different with the same bricks. Web Components follow the same principle.

Web Components are blocks of code that allow developers to repeatedly replicate certain functions (for example the graphic elements of a User Interface) in different positions of websites and web apps. Since the web components refer to a single code source, regardless of the number of pages they are used in, this approach lightens the weight of the software and reduces the length of the code also making maintenance easier.

Web Components include elements of HTML, CSS and JavaScript that are isolated from the rest of the code. They can be used in all of the JavaScript based frameworks and the libraries that work with HTML.