Skip to content

Scoped Slot Alternatives? #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CImrie opened this issue Mar 22, 2018 · 6 comments
Open

Scoped Slot Alternatives? #8

CImrie opened this issue Mar 22, 2018 · 6 comments

Comments

@CImrie
Copy link

CImrie commented Mar 22, 2018

Hi Evan,

Are scoped slots completely unsupported? It states that they can't be used at the moment in the docs.
Are you able to elaborate on the main roadblock to this?

I've got a perfect use-case for embedding a vue.js component as a snippet for people to paste into their website but it relies on scoped slots. I basically want them to provide a template and I provide all of the hooks for integrating with my API.

If this is actually impossible, is there any alternative? I'd like to use the reactivity of Vue without mounting to someones full page (since they might already be using it!)

Thanks in advance :)

@steamypassion
Copy link

steamypassion commented Jun 4, 2018

React have ReactShadow. Angular have native support. As Vue is top 3, it should also be supported in roadmap.
I think that I also consider similar with wrapped dynamic component inside the shadow dom.

<template v-for="(child, index) in listOfComponents"> <Shadow> <Component :is="child"></component> </Shadow> </template>

@mkamensky
Copy link

@CImrie Did happen to find a solution here? Thanks

@smallscript
Copy link

@CImrie
Copy link
Author

CImrie commented Feb 15, 2020

@mkamensky Unfortunately not really - I ended up using https://karol-f.github.io/vue-custom-element/#/ but accepted that I couldn't provide a renderless component that people could theme themselves. Haven't looked into it in a while though.

@smallscript does your project let you use scoped slots when dropping a component on an external page?

E.g.

<custom-element v-slot="props">
    <div class="user-custom-theme">{{ props }}</div>
</custom-element>

@mkamensky
Copy link

@CImrie thanks...

@nadar
Copy link

nadar commented Nov 23, 2020

Has there something changed since version 3.0 maybe? Scoped slots would be such a powerful option to customize the web components content 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants