Convert Figma logo to code with AI

nolimits4web logoswiper

Most modern mobile touch slider with hardware accelerated transitions

40,866
9,751
40,866
212

Top Related Projects

28,631

the last carousel you'll ever need

7,600

A dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more

5,079

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.

A lightweight carousel library with fluid motion and great swipe precision.

Quick Overview

Swiper is a modern, mobile-friendly JavaScript slider library with hardware-accelerated transitions and amazing native behavior. It's designed to be used in mobile websites, mobile web apps, and mobile native/hybrid apps. Swiper is free and open-source.

Pros

  • Highly customizable with numerous options and API methods
  • Smooth, hardware-accelerated transitions for optimal performance
  • Responsive and touch-friendly, works well on both mobile and desktop devices
  • Active development and community support

Cons

  • Can be overkill for simple slider needs
  • Learning curve for advanced customizations
  • Potential performance issues if not optimized properly
  • Dependency on external library may increase overall project size

Code Examples

  1. Basic Swiper initialization:
const swiper = new Swiper('.swiper', {
  slidesPerView: 3,
  spaceBetween: 30,
  pagination: {
    el: '.swiper-pagination',
    clickable: true,
  },
});
  1. Swiper with navigation buttons:
const swiper = new Swiper('.swiper', {
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },
});
  1. Responsive breakpoints:
const swiper = new Swiper('.swiper', {
  slidesPerView: 1,
  spaceBetween: 10,
  breakpoints: {
    640: {
      slidesPerView: 2,
      spaceBetween: 20,
    },
    768: {
      slidesPerView: 4,
      spaceBetween: 40,
    },
  },
});

Getting Started

  1. Install Swiper via npm:

    npm install swiper
    
  2. Import Swiper and its styles in your JavaScript file:

    import Swiper from 'swiper';
    import 'swiper/css';
    
  3. Add Swiper HTML layout to your page:

    <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>
    
  4. Initialize Swiper:

    const swiper = new Swiper('.swiper', {
      pagination: {
        el: '.swiper-pagination',
      },
    });
    

Competitor Comparisons

28,631

the last carousel you'll ever need

Pros of Slick

  • Lightweight and simple to use, with minimal setup required
  • Extensive browser support, including older versions of Internet Explorer
  • Responsive design with built-in breakpoints for different screen sizes

Cons of Slick

  • Less feature-rich compared to Swiper, with fewer advanced options
  • Not as actively maintained, with fewer updates and bug fixes
  • Limited touch support and mobile optimization compared to Swiper

Code Comparison

Slick initialization:

$('.slider').slick({
  slidesToShow: 3,
  slidesToScroll: 1,
  autoplay: true,
  autoplaySpeed: 2000,
});

Swiper initialization:

const swiper = new Swiper('.swiper-container', {
  slidesPerView: 3,
  spaceBetween: 30,
  autoplay: {
    delay: 2000,
  },
});

Both libraries offer similar basic functionality, but Swiper provides more advanced options and better performance for complex use cases. Slick is easier to set up and use for simple slider needs, while Swiper offers more flexibility and features for advanced implementations.

7,600

A dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more

Pros of Glide

  • Lightweight: Glide has a smaller file size, making it more suitable for projects where minimizing load times is crucial.
  • Simpler API: Glide offers a more straightforward and easier-to-use API, which can be beneficial for developers who prefer simplicity.
  • No dependencies: Glide is a standalone library without external dependencies, potentially reducing conflicts in your project.

Cons of Glide

  • Fewer features: Glide has a more limited set of features compared to Swiper's extensive functionality.
  • Less active development: Glide has fewer updates and a smaller community, which may result in slower bug fixes and feature additions.
  • Limited browser support: Glide may not work as well on older browsers compared to Swiper's broader compatibility.

Code Comparison

Glide initialization:

new Glide('.glide').mount()

Swiper initialization:

new Swiper('.swiper-container', {
  direction: 'horizontal',
  loop: true
})

Both libraries offer simple initialization, but Swiper provides more configuration options out of the box. Glide's approach is more minimalistic, while Swiper offers greater flexibility for complex use cases.

5,079

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.

Pros of Splide

  • Lighter weight and faster performance
  • No dependencies, pure JavaScript
  • More flexible and customizable API

Cons of Splide

  • Smaller community and ecosystem compared to Swiper
  • Fewer built-in features and modules

Code Comparison

Splide initialization:

new Splide('.splide', {
  type: 'loop',
  perPage: 3,
  autoplay: true
}).mount();

Swiper initialization:

new Swiper('.swiper', {
  loop: true,
  slidesPerView: 3,
  autoplay: {
    delay: 3000,
  },
});

Both libraries offer similar basic functionality, but Splide's API is generally more concise. Swiper provides more options out of the box, while Splide focuses on core functionality and leaves advanced features to extensions.

Splide's smaller file size and lack of dependencies make it a good choice for projects prioritizing performance and minimalism. Swiper, with its larger community and extensive feature set, may be preferable for complex projects requiring advanced functionality or widespread support.

Ultimately, the choice between Splide and Swiper depends on specific project requirements, desired features, and performance considerations.

A lightweight carousel library with fluid motion and great swipe precision.

Pros of Embla Carousel

  • Lightweight and performant, with a smaller bundle size
  • More flexible and customizable, allowing for advanced layouts
  • Better touch and mouse drag support, especially for mobile devices

Cons of Embla Carousel

  • Less extensive documentation compared to Swiper
  • Fewer built-in features and plugins out of the box
  • Smaller community and ecosystem around the project

Code Comparison

Embla Carousel:

import EmblaCarousel from 'embla-carousel'

const embla = EmblaCarousel(document.querySelector('.embla'), {
  loop: true,
  align: 'center'
})

Swiper:

import Swiper from 'swiper'

const swiper = new Swiper('.swiper-container', {
  loop: true,
  centeredSlides: true
})

Both libraries offer similar basic setup, but Embla Carousel's API is more focused on providing core functionality, while Swiper offers a wider range of options and features by default. Embla Carousel's approach allows for more granular control over the carousel behavior, but may require more custom code for advanced features. Swiper, on the other hand, provides many built-in options that can be easily configured without additional coding.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Get Started | Documentation | Demos

Financial Contributors on Open Collective Build status jsDelivr Hits tree-shakeable types included

Swiper

Swiper - is the free and most modern mobile touch slider with hardware accelerated transitions and amazing native behavior. It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps.

Swiper is not compatible with all platforms, it is a modern touch slider which is focused only on modern apps/platforms to bring the best experience and simplicity.

Sponsors

Skilled Writers for In-Depth Academic Papers Masterpapers - Qualified writers delivering excellence in every word! Best Online Casinos Canada Najlepsze Polskie Kasyna Grademiners - Professional writers, original content, quality you can trust! Nettikasinot Mercury Jets České Online Casino: Hrajte Bezpečně a Výhodně v 2024 Najlepšie Online Casino Slovensko 2024 | Október 2024 SS Market: Social Media Services Market Automatenspieler Best Online Casino Australia
Uudet nettikasinot 2024 » Listaamme Suomen uudet kasinot Nettikasinot 2022 | Löydä Luotettava & Turvallinen Nettikasino! NonGamStopOdds casino sites Online Casino Test 2022 » 90+ Casinos von Experten geprüft! Online sports betting and casino at Parimatch India Casinos not on GamStop | Casino-Wise.com Casinos not on GamStop UK 🏆 NonGamStopWager.com Online Casinos Cyprus - CasinoAuditor Best Online Casinos in Canada Pay Someone to Write My Research Paper Custom Writings someone to take my online class service
bot instagram followers AI ETFs 9 Best Sites to Buy TikTok Likes and Views (Real & Instant) Super Clone Watches - Trusted Dealer For 1:1 Replica Watches Buy TikTok Followers & Likes ゴールド取引 Buy Instagram Followers Expert Software Development Services with Certified LATAM Engineers Super Clone Watches For Sale: Best Website for 1:1 Replica Watches Replica Watches - Best Website for 1:1 Super Clone Watches humanize ai unaimytext Buy YouTube Views & Subscribers
Casino online - Vi jämför casinon på nätet i Sverige Parhaat kasinot - Valitse turvallinen nettikasino Pocket Option Promo Code New Casinos Not on Gamstop - Best Non GamStop sites in 2025 Casino not on GamStop Best Betting Buy YouTube Subscribers The Best Social Media Promotion Service Provider Trusted Source for Online Casino Info , Games, Guides , Reviews Buy Instagram Followers with Instant Delivery buy tiktok followers Buy YouTube Subscribers & Views UK
Miramtech Uudet Nettikasinot Huhtikuu 2025 | Parhaat Uudet Kasinot Goldstar Social Pistolo Casino TikTok Likes Chudovo Buy Tiktok Followers Online Casino Ausland: Beste ausländische Online Casinos Casino Bonus ohne Einzahlung 2025 Kasyno online w Polsce Free Instagram Likes Inclave Casino List CA
Instagram Story Viewer Casino online Favbet Buy Tiktok Likes BuyTopLikes - Buy Instagram Followers Buy X Followers from TweSocial (Instant & Cheap) SidesMedia: Buy Followers, Views, Likes & More Mejores Casinos Internacionales Online de España 2025 CasinoKennis casino online ellada БК Favbet Казино онлайн casinos not on Gamstop
Online Casinos mit deutscher Lizenz Casinofy CasinoAllianz Useful guides about PayID pokies and casino sites for Australians casinò online Italia Top UK Casinos Not on GamStop in 2025 nogamstopcasinos.org.uk My Social Following DashTickets New Zealand gambling magazine best tether casinos Buy TikTok Followers Онлайн казино casino.ua
Ставки на спорт buy instagram followers Онлайн казино та БК (ставки на спорт) в Україні Where Can I Buy TikTok Likes & Views? O Καλύτερος Οδηγός Online Καζίνο Top online casino's van Nederland Polskie Sloty RoboCat Casino Best and cheapest site to buy tiktok followers Buy TikTok Likes Beste online Casino Österreich ✅ Leitfaden für Glücksspieler Zamsino.com 🎖️ Global Online Gambling Guide
Betwinner Partner Wordle Hint Today Togel Hongkong Togel Singapore Togel Hari Ini Data Keluaran SGP HK Prize RustCasino - The Best Rust Gambling Site Online Casinos Deutschland Casinos online em Portugal Betting Site Aktualne Bonusy Bez Depozytu 🎖️ wrzesień 2024 eSports at HellaGood Marketing agency Inclave Casino Famegear — Trace your favorite figure's fame through their gear Honrev — The Most Honest Product Reviews From Real Customer Experiences
Online Casino Nederland My Coding Pal UK Casinos not on GamStop 2025 - nongamstopcasinos.net Guidebook.BetWinner ZonderCruks - Online Gokken Zonder CRUKS Free Chip No Deposit Best Bitcoin & Crypto Casino Sites SocialBoss Mejores Casinos Sin Licencia en España SANCTIONS LAW FIRM Interpol Law Firm try bookmakers not on GamStop
Buy Instagram Followers & Likes CasinoRevisor: Alles über die besten Casinos in Deutschland Accelerating Your Software Products | Teravision Technologies Casino Magyar Ta καλύτερα διαδικτυακά καζίνο στην Ελλάδα το 2024 Bulkoid Gokken Online Norska Casino HolyMolyCasinos Danske casino Sitio web con reseñas de los mejores casinos en línea de Chile Greece Casinos Casino Bonussen Nederland
Casino No deposit Bonus 2024 Best sites to Buy Instagram Likes Jämför försäkringar Buy Instagram Likes - Real Likes & Instant Delivery! Trace a phone number within minutes Vedonlyontiyhtiot.com - Parhaat Vedolyöntiyhtiöt & Bonukset Purchase TikTok followers, likes and views Buy Youtube Views UpGrow: #1 AI-Powered Instagram Growth | Real IG Followers Best Bitcoin Casinos Topnoaccountcasinos casino zonder registratie Best Real Money Online Gambling Sites 2023
Prointernet Nexus Smoke Premium E-Liquid and Luxury Vape Products Overlyzer » football betting analyzer & soccer predictions Casino utan Svensk Licens | Bästa Casinon utan Spelpaus 🎖️ BetFans - Alles over online wedden; Bookmakers Vergelijken Top USA Online Casinos September 2023 | Online United States Casinos Best Online Casino in Philippines using GCash | 2023 Rank Best Online Casinos in New Jersey Technology, Security, Innovation, The Cyber World Now | Cyberogism Hosting Europe – Super fast support better than AI Buy Instagram Reels Views Onlinecasinosspelen.com site is dé nummer één gids, waardoor je gemakkelijk alle informatie van de top 10 online casino sites.
Rotativka.com - Най-добрите онлайн казина в България Under 1 Hour Withdrawal Casinos in Australia - 2022 PA Online Casino - List of Best Casinos in Pennsylvania Casino Zonder Registratie 2022 | CZR's Top No Account Casino's Ranglijst Nieuwe Online Casino's December 2022 | Overzicht van de top nieuwe casinos! cricket betting app WiserGamblers | Best Online Gambling Guide betting sider 🥇 Best Australian Online Pokies. Trusted Online Casino Reviews 2022 The Casino Wizard » Best Casinos & (No) Deposit Bonuses 2022 Fastest Payout Casinos in Canada [2022] Clique Studios - Creative Digital Transformation
Correct Casinos | The Ultimate Guide to the Legit Online Casinos IB extended essay writing service Online Slots - UK Slot Games - 500 FREE Spins at Wizard Slots Fortune Games® | Free Spins No Deposit Slot Games | Online Slots LÅN PENGE NU | Hurtige Online lån 2021 | Klik her og Ansøg i dag VPN for Chrome to Make Web Surfing 100% Safe CasinoExpo casino utan registrering Ranking Bukmacherów Legalnych 2020. Bukmacher nr 1 to... The Best Online Casinos in the UK » Gambling Sites by Casinosters Deposit £10 Play with 30, 40, 50, 60, 70, or 80 Pounds✔️ GambLizard Instagram likes Buy 100% Cheap SMM Services - Instagram, YouTube, Twitter

Features

  • Tree-shakeable: Only modules you use will be imported into your app's bundle.
  • Mobile-friendly: It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps.
  • Library Agnostic: Swiper doesn't require any JavaScript libraries like jQuery, which makes Swiper much smaller and faster. It can be safely used with libraries such as jQuery, Zepto, jQuery Mobile, etc.
  • 1:1 Touch movement: By default, Swiper provides 1:1 touch movement interaction, but this ratio can be configured through Swiper settings.
  • Mutation Observer: Swiper has an option to enable Mutation Observer, with this feature Swiper will be automatically reinitialized and recalculate all required parameters if you make dynamic changes to the DOM, or in Swiper styles itself.
  • Rich API: Swiper comes with a very rich API. It allows creating your own pagination, navigation buttons, parallax effects and many more.
  • RTL: Swiper is the only slider that provides 100% RTL support with correct layout.
  • Multi Row Slides Layout: Swiper allows a multiple row slides layout, with a few slides per column.
  • Transition Effects: Fade, Flip, 3D Cube, 3D Coverflow.
  • Two-way Control: Swiper may be used as controller for any number of other Swipers, and even be controlled at the same time.
  • Full Navigation Control: Swiper comes with all required built-in navigation elements, such as Pagination, Navigation arrows and Scrollbar.
  • Flexbox Layout: Swiper uses modern flexbox layout for slides layout, which solves a lot of problems and time with size caclulations. Such layout also allows configuring the Slides grid using pure CSS.
  • Most Flexible Slides Layout Grid: Swiper has a lot of parameters on initialization to make it as flexible as possible. You can control slides per view, per column, per group, space between slides, and many more.
  • Images Lazy Loading: Swiper Lazy Loading delays loading of images in inactive/invisible slides until the user swipes to them. Such feature could make the page load faster and improve Swiper performance.
  • Virtual Slides: Swiper comes with Virtual Slides feature that is great when you have a lot of slides or content-heavy/image-heavy slides so it will keep just the required amount of slides in DOM.
  • Loop mode
  • Autoplay
  • Keyboard control
  • Mousewheel control
  • Nested sliders
  • History navigation
  • Hash navigation
  • Breakpoints configuration
  • Accessibility (A11y)
  • And many more ...

Community

The Swiper community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects

Our Code of Conduct applies to all Swiper community channels.

Dist / Build

On production use files (JS and CSS) only from dist/ folder, there will be the most stable versions.

Development Build

Install all dependencies, in repo's root:


$ npm install

And build development version of Swiper:


$ npm run build

The result is available in dist/ folder.

Running demos:

All demos located in ./playground folder. There you will find Core (HTML, JS), React, Vue versions. To open demo, run:

  • Core: npm run core
  • React: npm run react
  • Vue: npm run vue

Production Build


$ npm run build:prod

Production version will available in dist/ folder.

Contributing

All changes should be committed to src/ files only. Before you open an issue please review the contributing guideline.

Major Roadmapped Features

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

NPM DownloadsLast 30 Days