Swiper
v14.4.0Touch friendly slider and carousel with navigation, pagination and effects.
Quick start
Add these tags to your page. Place stylesheets in the <head> and scripts just before the closing </body> tag.
HTML
<link rel="stylesheet" href="https://jscdns.net/libs/swiper/14.4.0/swiper-bundle.min.css"
integrity="sha384-2TOnuAisFGpj1hSAfsLnuarX0KvbOPIYqLdA3cb1a/lsolS0o2erpWGurIfnVN1I" crossorigin="anonymous">
<script src="https://jscdns.net/libs/swiper/14.4.0/swiper-bundle.min.js"
integrity="sha384-l1wx25dMV7miVT1AJ+fIu9i3Fr51DvXq1GkFzWrEtm5x3UAYL69+LdXz/PXGFbBT" crossorigin="anonymous"></script>Files
| File | Size | Copy |
|---|---|---|
| swiper-bundle.min.cssStylesheet | 14.3 KB | |
| swiper-bundle.min.jsScript | 151.2 KB |
Usage
Complete example
A minimal page that loads Swiper and uses it. Copy it into a file and open it in your browser.
example.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://jscdns.net/libs/swiper/14.4.0/swiper-bundle.min.css"
integrity="sha384-2TOnuAisFGpj1hSAfsLnuarX0KvbOPIYqLdA3cb1a/lsolS0o2erpWGurIfnVN1I" crossorigin="anonymous">
</head>
<body>
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
</div>
<div class="swiper-pagination"></div>
</div>
<script src="https://jscdns.net/libs/swiper/14.4.0/swiper-bundle.min.js"
integrity="sha384-l1wx25dMV7miVT1AJ+fIu9i3Fr51DvXq1GkFzWrEtm5x3UAYL69+LdXz/PXGFbBT" crossorigin="anonymous"></script>
<script>
const slider = new Swiper('.swiper', {
loop: true,
pagination: { el: '.swiper-pagination', clickable: true },
autoplay: { delay: 4000 }
});
</script>
</body>
</html>Good to know. The bundle build includes all modules (navigation, pagination, autoplay and so on), so you do not need to register them separately.