Skip to content

Option to not make the named slot a child of a node #5303

@TheComputerM

Description

@TheComputerM

Is your feature request related to a problem? Please describe.
There should be some option to not bind the slot to any node:

<div class='test'><slot name="test" /></div>

and the input:

<p slot="test">Hello <b>World</b></p>

and the output is:

<div class='test'><p slot='test'>Hello <b>World</b></p></div>

But, there is no way to get something like this with using named slots:

<div class='test'>Hello <b>World</b></div>

Describe the solution you'd like
I would prefer for something like this:

<p slot="test" slot:node={false}>Hello World</p>

So the p element will not be added to the slot, but just the content.

How important is this feature to you?
Important, as this causes many problems with component composition and flexbox.

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