svelte slot ✓ Composing Svelte Components with Slots by John Au-Yeung

฿100.00


I feel I can express some confusion about slots in Svelte 5 In Svelte 4, slot and names slots where done in the following way svelte slot I want to use Component as Slot, I want to create two Components Title and Caption , and set up a target slot for them I'm not sure if it is possible or not

svelte slotData is passed using slots to render it as an HTML tag to a specific child The slot is used as a tag in the child component while defining data for variables

svelte slot We can have multiple slots in a Svelte component by using the name attribute on the slot component Let's assume we want to extend the blog card