1
/
of
1
2 ways to pass data into Svelte slots
2 ways to pass data into Svelte slots
Svelte script setup> import { computed } from 'vue' import { usePage } message class=alert> {{ $ }} div> slot
Components can pass data back to their slotted content via slot props In this app, we have a list of named CSS colours Typing into the input> will filter
sveltekit slot BTW, sveltekit seems have changed some features in the svelte, like this slot props? If you want to pass dynamic data from the layout
svelte get slot content in the parent component when you create dynamic content Here is an example of how you can use these Composing Components 58 Passing data through slot props
Regular
price
182.00 ₹ INR
Regular
price
182.00 ₹ INR
Sale
price
182.00 ₹ INR
Unit price
/
per
Share
![svelte pass props to slot](10032.jpg)