How do Svelte's slots work once items are compiled to web components? Is it possible to pass HTML in when using them on the page?
Hi bemisawa! yes it's possible to pass html to web components
For example if your web components is:
<div> <slot /> <span> <slot name="secondslot"></slot> </span> </div>
you can use this way :
<my-component> default slot. <small slot="secondslot">second slot</small> </my-componentn>
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How do Svelte's slots work once items are compiled to web components? Is it possible to pass HTML in when using them on the page?
Hi bemisawa! yes it's possible to pass html to web components
For example if your web components is:
you can use this way :