This is a (multiple allowed):
Setup <Swiper> React
When I'm trying to drag/drop, the console throws the following error
Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'
No error should be thrown, and I should be able to drag/drop
Example:
```.tsx
``
Also little note: thebreadcrumb-wrapperclass is not applied and I had to addslot="wrapper-start"` :/
Hello! Any update around here?
Would be good to see live example (in a form of JSFiddle, CodeSandbox, etc.)
Had the same error when setting up the basic slider (not react related). My fault was, that I used the wrong root element.
On the official demo HTML, you need to bind the instance to .swiper-container and NOT .swiper-wrapper like I did initially.
<!-- Slider main container : Bind swiper instance to this element -->
<div class="swiper-container">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
...
</div>
<!-- If we need pagination -->
<div class="swiper-pagination"></div>
<!-- If we need navigation buttons -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<!-- If we need scrollbar -->
<div class="swiper-scrollbar"></div>
</div>
Most helpful comment
Had the same error when setting up the basic slider (not react related). My fault was, that I used the wrong root element.
On the official demo HTML, you need to bind the instance to
.swiper-containerand NOT.swiper-wrapperlike I did initially.