Interactive web components guide

2 mins

An abstract visual of moving waves in a dark enviroment

Web components have revolutionized how we build modern web applications. They offer a powerful way to create reusable, encapsulated custom elements that work seamlessly across any framework or vanilla JavaScript project.

What are web Components?

Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. They consist of three main technologies:

Custom elements

Custom elements let you define your own HTML tags with their own behavior and properties.

Shadow DOM

Shadow DOM provides encapsulation, keeping your component's markup structure, style, and behavior hidden and separate from other code on the page.

Html templates

HTML templates allow you to define markup structures that can be cloned and reused across your application.

Create a free website with Framer, the website builder loved by startups, designers and agencies.