Web component nesting

1
closed
LucaGabi
LucaGabi
Posted 2 years ago

Web component nesting #8

Hi

I have a question: can we a web component bee placed inside another web component what happens with the shadow dom in this case ?
praveenpuglia
praveenpuglia
Created 2 years ago

hey @LucaGabi!

Sorry I didn't really check out issues on this repo.

You can definitely place a web component inside another. Just like any other html elements.

Your inner web component goes into the default slot of the parent web component and anything you put inside your inner web component goes wherever you want them to go inside the inner one. Just like any other html elements.

I hope that answers your question.