Named slot prop available with `let:` on the component • REPL
Named slot prop available with `let:` on the component • REPL
Regular
price
176.00 ₹ INR
Regular
price
Sale
price
176.00 ₹ INR
Unit price
/
per
svelte pass props to slot Dan svelte slot props
View full details
Slotspermalink Slot and slot prop types are inferred from the types of the slot props passed to them: script lang=ts> export let name: string; script>
Svelte script setup> import { computed } from 'vue' import { usePage } message class=alert> {{ $ }} div> slot Composition means allowing your components to contain other components or HTML elements Slots are made possible in Svelte by using the slot>
pg slot 99 When creating Svelte components, you may need to expose the parent component values to the child component The Svelte let directive can do We can use slot props to pass data from the child to parent using the let: directive of slots This helps us set up separation of concerns