-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Auto Height support #113
Comments
EditAn auto height plugin is available as of v6.1.0. OPHi Aaron (@peps), The vision for Embla Carousel is that it should be a lightweight bare bones carousel library. So it should basically solve the hardest technical challenges with building great carousels and do it good. I think adaptive height is quite easy to achieve utilizing the Embla Carousel API so I think this feature should be left out of the Embla core. With that said, do you want me to create a CodeSandbox that demonstrates how to achieve this? Best, |
Hey David, thanks for the quick response. Makes sense wanting to keep it light, I ended up forcing my client to upload their images at consistent sizes, so I no longer need the functionality. But I have used adaptive height in the past with other carousels. You're right though, if I ever need it again in the future, I could build it using the API. Ill just close the issue with this comment, thanks again ;) |
Hi Aaron (@peps), Thanks for the response and I'm glad my reasoning made sense to you 🙂. Feel free to reach out if you would like me to create a CodeSandbox demonstrating an adaptive height carousel with Embla in the future. Kindly, |
Hey @davidcetinkaya, I'm currently looking into this (nice timing), but I don't want to take much of your time for a demo, could you in a few words describe how you would achieve this the embla way before I try my approach(es) below? I was looking at the examples (Lazy-Load to be specific since it has 1 slide displayed) and currently without testing I'd try to change the height in the Thanks for your incredibly helpful responses, helped me already a few times in the past 🙂 |
Hi @venyii, I decided to create a CodeSandbox to demonstrate how to achieve adaptive height with Embla. Maybe there are more people out there that would like to implement this so I figured the sandbox could be helpful. Please note that I didn't add a smooth CSS height transition to the viewport in the example, but that could be added quite easily so I'm going to leave that up to you.
I'm glad you find them helpful. If it's not too much to ask, I would appreciate if you gave the responses you have in mind a thumbs up or similar. This could help other visitors/users looking to implement similar features. Let me know if the CodeSandbox helps. Best, |
Oh wow thank you very much! Hope others find it helpful as well in the future 🙂 I went back and tried to find the helpful responses in my case and gave a 👍 Thanks again for your work! |
Thanks for the help @venyii. Enjoy 🙂. |
Is there a way to have CodeSandbox which uses the CDN only? |
Thank you for your question @RoyiAvital. |
Reopening this:As of v.6 it’s possible to provide plugins to Embla. An Auto Height plugin will be added in the future:
|
I'm happy to announce that this plugin has been released with v6.1.0 🎉. |
Hi! I'm loving using Embla, but it seems to be missing a common feature that would make it perfect.
Would it be possible to add auto-height support? So when showing 1 slide at a time, the height of the container changes to match the current slide.
The text was updated successfully, but these errors were encountered: