Liquid component slots

Highlighted
New Member
2 0 0

Hi,

In essentially every HTML templating language I know, we can use slots. Something like this would be done in Blade:

<!-- Using a card component -->
<x-card>
    <x-slot name="title">
        Foo Bar Baz
    </x-slot>
    
    <p>
        This is the inner content of the card
    </p>
</x-card>

 I'm struggling to see how this could be done using Liquid, and that's a huge deal breaker for me. It means I would have to repeat myself constantly when reusing design components.

Thanks

0 Likes