Skip to content

Named slots #8

@BjornDCode

Description

@BjornDCode

Currently components in Stencil only support 1 slot - the default slot.

// Components/Layout.stencil
<main>
    <slot />
</main>
<Layout>
    <p>...</p>
</Layout>

It should be possible to define more slots and assign them names

// Components/Layout.stencil
<div>
    <header>
        <slot name="header" />
     </header>
    <main>
        <slot />
    <main>
    <footer>
        <slot name="footer" />
     </footer>
</div>
<Layout>
    <p>...</p>
</Layout>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    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