-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Toggle axis example #86
Comments
Thanks, and thank you for your question Roland (@rolandtoth), I will set up a CodeSandbox as soon as possible demonstrating this. I'll let you know when I have something. Kindly, |
Hi again Roland @rolandtoth, I've created a CodeSandbox demonstrating how to achieve this. The trick is to change the container CSS to Please also note that Embla Carousel doesn't care about the CSS you use to stack items vertically or horizontally, you might as well use CSS grid to achieve this. I used flexbox to do it =). Let me know if it helps! Best, |
Hi, very nice, thanks! I was close as I also tried flex wrap but couldn't get it to work. An unrelated question: is dangerouslyGetEngine() an undocumented feature? Is it safe to use? Thanks again, |
I’m glad it helped @rolandtoth. About the I hope this answers your question? Best |
Sure, it's dangerously enough for me, thanks :) |
Thanks for this wonderful carousel, I'll definitely use it my next project.
One question though: I tried to use .reInit(options) to switch between horizontal and vertical layouts (axis) on a button click, but no joy. Apparently the carousel moved in the desired direction, but only the first image was shown in the "other axis" mode. It seems it was a CSS (embla.css, ".embla__container" being flex and other width/height values) issue but I couldn't figure it out. Any chance of an example that can achieve this?
The text was updated successfully, but these errors were encountered: