-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Currently, you need a single DOM element to fill a slot. This limits slots’ usefulness in various scenarios.
#1037 and #1713 are about allowing a Svelte component to fill a slot, and I believe there is consensus in v3 that this is desirable and intended. Given that a component does not necessarily render to a single DOM element, this is interesting.
It would also be nice to be able to do this without needing to create a whole new component, or a DOM element. Two strawman syntaxes:
{#slot "foo"}
…
{/slot}
<div slot="foo" svelte:slot-behaviour="exclude-wrapping-element">
…
</div>
There may be considerations for Custom Elements, but if it’s sorted out for all Svelte components first then there should be nothing fundamentally new here.
theSherwood, steve-taylor, kylecordes, tomblachut, atomAltera and 36 more
Metadata
Metadata
Assignees
Labels
No labels