Here is how others are using astro-swiper, as found in public github repo:
the famous astro template astroplate in the
testominial section
(cf. What Users Are Saying About Astroplate):
autoplay, pagination and breakpoints are used.
the well-known astro template hello-astro
uses swiper in the carousel page
as well as in blog article.
It makes use of navigation arrow, pagination and autoplay.
bigspring-light-astro astro theme is
also using astro-swiper in several places in the
main page with customized pagination.
when false, use a <div> to be as close as possible to swiperjs default. Use a custom element <astro-swiper> otherwise.
thumbSwiperUniqueSelector
string starting with # or .
undefined
unique selector of the thumbnail swiper to link with, when using the thumbs module. When a thumbnail swiper is build, this parameter is provided on the main slider (the one with big slides, not the one to track the progress) and equal the unique selector of the thumbnail swiper (the one to track the progress). It is used to link the main swiper with the thumbnail swiper when using the thumbs module.
intersectionObserver.initSwiper
boolean
false
true to initialize the swiper when the element appears in the screen
intersectionObserver.disconnectOnInit
boolean
false
true to disconnect the observer once the swiper is initialized
intersectionObserver.controlAutoplay
boolean
false
true to start and stop the autoplay when the swiper appears and disappears from the screen, respectively
Wrapper of all slides. Inherits all HTMLAttributes<'div'> (class…) attributes.
Name
Type
Default
Description
addDefaultClass
Boolean
true
Add class .swiper-wrapper when true
<SwiperSlide/>
A single slide. Inherits all HTMLAttributes<'div'> (class…) attributes.
Name
Type
Default
Description
addDefaultClass
Boolean
true
Add class .swiper-slide when true
<SwiperPagination/>
Pagination dots. Inherits all HTMLAttributes<'div'> (class…) attributes.
Name
Type
Default
Description
addDefaultClass
Boolean
true
Add class .swiper-pagination when true
<SwiperButtonPrev/> and <SwiperButtonNext/>
Navigation arrows. Inherits all HTMLAttributes<'div'> (class…) attributes.
Name
Type
Default
Description
addDefaultClass
Boolean
true
Add class .swiper-button-prev or swiper-button-next when true
<SwiperScrollbar/>
Scrollbar. Inherits all HTMLAttributes<'div'> (class…) attributes.
Name
Type
Default
Description
addDefaultClass
Boolean
true
Add class .swiper-scrollbar when true
<SwiperLazyPreloader/>
Slide lazy loader. To be used inside a <SwiperSlide/>. Inherits all HTMLAttributes<'div'> (class…) attributes.
Name
Type
Default
Description
addDefaultClass
Boolean
true
Add class .swiper-lazy-preloader when true
getSwiperFromUniqueSelector()
Function to be used in script part, to be able to retrieve the swiper instance given
a unique selector (starting with a . or a #), once the load event is fired.
This allows to use functions and events in swiper.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In luctus,
ex eu sagittis faucibus, ligula ipsum sagittis magna, et imperdiet
dolor lectus eu libero. Vestibulum venenatis eget turpis sed
faucibus. Maecenas in ullamcorper orci, eu ullamcorper sem. Etiam
elit ante, luctus non ante sit amet, sodales vulputate odio. Aenean
tristique nisl tellus, sit amet fringilla nisl volutpat cursus.
Quisque dignissim lectus ac nunc consectetur mattis. Proin vel
hendrerit ipsum, et lobortis dolor. Vestibulum convallis, nibh et
tincidunt tristique, nisl risus facilisis lectus, ut interdum orci
nisl ac nunc. Cras et aliquam felis. Quisque vel ipsum at elit
sodales posuere eget non est. Fusce convallis vestibulum dolor non
volutpat. Vivamus vestibulum quam ut ultricies pretium.
Suspendisse rhoncus fringilla nisl. Mauris eget lorem ac urna
consectetur convallis non vel mi. Donec libero dolor, volutpat ut
urna sit amet, aliquet molestie purus. Phasellus faucibus, leo vel
scelerisque lobortis, ipsum leo sollicitudin metus, eget sagittis
ante orci eu ipsum. Nulla ac mauris eu risus sagittis scelerisque
iaculis bibendum mauris. Cras ut egestas orci. Cras odio risus,
sagittis ut nunc vitae, aliquam consectetur purus. Vivamus ornare
nunc vel tellus facilisis, quis dictum elit tincidunt. Donec
accumsan nisi at laoreet sodales. Cras at ullamcorper massa.
Maecenas at facilisis ex. Nam mollis dignissim purus id efficitur.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
dictum mattis velit, sit amet faucibus felis iaculis nec. Nulla
laoreet justo vitae porttitor porttitor. Suspendisse in sem justo.
Slide 4
Subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
dictum mattis velit, sit amet faucibus felis iaculis nec. Nulla
laoreet justo vitae porttitor porttitor. Suspendisse in sem justo.
Slide 5
Subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
dictum mattis velit, sit amet faucibus felis iaculis nec. Nulla
laoreet justo vitae porttitor porttitor. Suspendisse in sem justo.