Skip to content

Unexpected behavior with props on named slots #7245

@gtm-nayan

Description

@gtm-nayan

Describe the bug

From the docs (emphasis mine)

Named slots can also expose values. The let: directive goes on the element with the slot attribute.

However it seems that those props can also be exposed through a let: on the <Component>. Not entirely sure whether this is an actual bug or just lacking better documentation.

Reproduction

https://svelte.dev/repl/f3fa64f34cc740deb6b7ed7dca0bf657?version=3.46.4

Logs

No response

System Info

Chromium 98.0.4758.87

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions