Ask questionsDynamically generated slots and context

Is your feature request related to a problem? Please describe. I am looking at Svelte and wondering if it would work for a project where we would have to build admin interface for a lot of data to display and manage while maintaining a large degree of reusability of visual elements. I don't see it working in Svelte3, so I am entering it here in hopes that it might drive some future decisions.

Describe the solution you'd like I'd like to be able to create a library of UI elements that would have standard baseline behavior but provide extensibility to fit all practical cases. For example, a table could provide ability to reorder columns or switch them on and off or resize them. Such behavior could be encapsulated in a custom component. At the same time the page component containing the table should be able to generate content for slots as necessary to meed business goals. I made a "make believe" version of the code at

Describe alternatives you've considered I don't see any alternatives

How important is this feature to you? I think it is essential for admin interfaces and dashboards.

Additional context This is a paradigm we used on the server side in a classic MVC app we built before.


Answer questions Demysdcl

I have that component in Vue and I can't create it in Svelte, because doesn't have dynamic slots

    <ul class="tabs">
        v-for="(tab, idx) in tabs"
        @click="tabSelected = idx"
        <slot :name="`header-${idx}`">{tab}</slot>
    <div class="tab-content">
        v-for="(tab, idx) in tabs"
        <slot v-if="idx === tabSelected" :name="`tab-${idx}`">
          Implement tab-{{ idx }}

  export default {
    props: {
      tabs: Array
    data: () => ({
      tabSelected: 0
Demys Cota Demysdcl Snowmanlabs Curitiba, PR System Analyst and full stack developer, working since 2013 with various technologies back and front end.
Github User Rank List