question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initial Carousel Blank

See original GitHub issue

Bug is related to

  • embla-carousel (core package)
  • embla-carousel-react
  • embla-carousel-autoplay
  • embla-carousel-docs (documentation website)

Embla Carousel version

  • v6.0.2

Describe the bug

Embla carousel is initially blank, and needs to be resized before it renders the image. This happens only sometimes and randomly. I have read the other issues regarding the same, but none of the tehniques work, I understand its a reinitializing issue but cannot figure out how to make it work. I am using it with NextJs 12.

I have the sample code to get started in this github repo - https://github.com/kush-daga/emblademo

CodeSandbox

  • The link to a CodeSandbox that demonstrates the bug clearly.

Steps to reproduce

1.Clone the https://github.com/kush-daga/emblademo repo, and yarn dev. 2. Initially its a blank screen, resize to view images.

Expected behavior

  • Carousel should work in the first render

Additional context

https://user-images.githubusercontent.com/40840079/148800760-3ec6e86e-4314-4978-815c-f463d06a2aa1.mp4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
davidjerlekecommented, Jan 16, 2022

@kush-daga I’ve just released the Auto Height plugin with v6.1.0. Here’s the release details. Just make sure your slides have their natural height before initializing Embla so Embla can pick them up. So don’t set height: 0; on your slides or similar.

Best, David

1reaction
davidjerlekecommented, Feb 23, 2022

@kush-daga thank you for sharing 👍🏻.

Just wanted to let you know that what you want to achieve will be available as an Embla plugin as soon as I get some time to make it:

Best, David

Read more comments on GitHub >

github_iconTop Results From Across the Web

bootstrap 3 carousel abnormal: blank content appears when ...
bootstrap 3 carousel abnormal: blank content appears when go "prev" before the 1st slider item, but working perfect as long as click "next"....
Read more >
Why is MDB Carousel showing empty starting slide on page loa
Hello everyone,. I am trying to use the MDB carousel for a simple image slider in an angular project. All my images are...
Read more >
Carousel blank when changing tab for the first time. Will ...
When I run my app, the carousel on the first screen works as expected. But when I change tab to my second screen,...
Read more >
Free The First Blank Page Template - Instagram - PicMonkey
The First Blank Page - Instagram Carousel Ad Template. 1080 x 1080 px. To use this template, go to PicMonkey.com on your desktop....
Read more >
449180 - Blank slide at the beginning of Carousel animation ...
Issue 449180: Blank slide at the beginning of Carousel animation upon returning ... The carousel should display one slide or two slides next...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found