0

I have a question how can I add existing elements to shadow dom. I have list of elements/components mostly form elements in slot and I want to have them in shadow dom of my component. I need all bindings also to be copied is it possible? Thanks for help.

adi86
  • 253
  • 1
  • 2
  • 8

1 Answers1

0

The <slot> element can help with this. It allows you to "project" user's content into a shadow root.

https://developers.google.com/web/fundamentals/web-components/shadowdom#composition_slot

matthewsteele
  • 1,797
  • 1
  • 15
  • 31