Using SwiperJS in my ReactJS application. I've imported the default style bundle, but can't figure out how to style the pagination container or the bullets.
In the pagination:
param within ...
Every time I change the el:
param, the pagination just disappears.
Every time I change the bulletClass:
the styles I add in my css doesn't get applied.
import { Swiper, SwiperSlide } from 'swiper/react';
import SwiperCore, { Pagination, Navigation, A11y } from 'swiper';
import 'swiper/swiper-bundle.css';
SwiperCore.use([Navigation, Pagination, A11y]);
return (
<>
<Swiper
spaceBetween={50}
slidesPerView={1}
navigation
pagination={{
clickable: true,
el: `swiper-container swiper-container-testClass`,
bulletClass: `swiper-pagination-bullet swiper-pagination-testClass`
}}
wrapperTag='ul'
>
<SwiperSlide tag='li' key={1}>
{<div>My Data</div>}
</SwiperSlide>
</Swiper>
</>
)
Anyone know how you can override the default styles? Namely, I'm looking to move the pagination-container above the slide content and not inside the slide at the bottom (can't even see it).
API in question: Swiper React
swiper-bundle.css
under the node_modules/swiper directory. There you can find the variables and the CSS that is defined for components of the swiper. – Glindaglinka