Skip to content
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

Feature request: custom images instead of chars #1

Closed
janbalaz opened this issue Jan 4, 2018 · 3 comments
Closed

Feature request: custom images instead of chars #1

janbalaz opened this issue Jan 4, 2018 · 3 comments

Comments

@janbalaz
Copy link

janbalaz commented Jan 4, 2018

I like idea and simplicity of this plugin, but I'm missing the option to use own images instead of just characters.
My goal is to use my custom images in a size I provide. I'll keep an eye on this repository. Thank you for your work so far!

@richardtallent
Copy link
Owner

Thanks Jan!

I believe what you're suggesting should already be possible by using an em-space for both the active and inactive character, then using CSS styling to apply a background-image to span.active and span.inactive elements. You should even be able to use SVG background images, which could be also styled (or even animated).

I'm open to adding native support for images, if I can figure out how to make the metrics work. For that, I'd either introduce <img> tags, or perhaps replace the character props with named slots (which also avoids some of the complexities of specifying high-Unicode characters, since slot contents can be encoded.

Good stuff to think about for the next version...

@janbalaz
Copy link
Author

janbalaz commented Jan 5, 2018

Thank you Richard, I will look into your suggested solution and use that for now.

I think solution with usage of slots would be very good. I like how vuex-loading is done - there is a slot where you can put own custom spinner icon and scale it using em units.

@richardtallent
Copy link
Owner

Hey @janbalaz... just wanted to let you know that Version 1.0 is out, and now scoped/named slots are supported! It's still a little rough--I'm not passing any particular values to the slots, just using them for markup, but based on my very quick test (which is part of the demo page now), it seems to be working.

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

2 participants