Skip to main content Accessibility Feedback

Can you nest Web Components inside each other?

A few weeks ago on my YouTube channel, a viewer asked…

Can you nest Web Components inside each other?

The tl;dr (or tl;dw, I suppose) is yes, you can! It’s an approach I use often.

I put together a video walking through the two different approaches I use.

The two approaches are…

  1. HTML Web Components with completely separate functionality.
  2. Splitting up the functionality of a Web Component into several smaller, interconnected micro-components.

Go watch the full video to see how exactly I do it, and download the source code.