Skip to content

Schema Slots code example doesn't show how to use slots #152

@hisuwh

Description

@hisuwh

In the documentation for the FormKit Schema under the slots section here: https://formkit.com/essentials/schema#slots

The code example doesn't actually use any slots or show how you could do this. Can this be updated and can I get some guidance on how to do this.

I.e. if I had some component used like this:

<MyComponent>
    <template #slot1>
        Hello from slot 1
    </template>
    <template #slot2>
        Hello from slot 2
    </template>
</MyComponent>

How would I define this in the schema syntax? I would expect something like this:

{
    "$cmp": "MyComponent",
    "$slots" [
        {
            "name": "slot1",
            "children": "Hello from slot 1"
        } ,
        {
            "name": "slot2",
            "children": "Hello from slot 2"
        }  
    ]
}

Or is this even possible?

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