Skip to content

slot forwarding #5535

Description

@TheComputerM

Is your feature request related to a problem? Please describe.
There is no proper way to forward slots other than for them to be wrapped in a parent element.

Describe the solution you'd like
The slot prop to be able to be added to slot elements.

<Component>
  <slot slot="inherited" name="forwarded" />
</Component>

Where the slot inherited is forwarded as forwarded to the component that consumes this one.

Describe alternatives you've considered
Wrapping the slot in a div element, causes problems with flexbox and performance.

How important is this feature to you?
3/5. not too important but very useful to have.

Additional context
https://svelte.dev/repl/5acc582e28f04d06aff5f3b861e7537f?version=3.29.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions