Convert Figma logo to code with AI

nolimits4web logoswiper

Most modern mobile touch slider with hardware accelerated transitions

41,803
9,707
41,803
246

Top Related Projects

28,603

the last carousel you'll ever need

7,673

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

5,339

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,603

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,673

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,339

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

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.

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 calculations. 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

Sponsors

PunchngNGR Norway Casinos Online Mexico Kasino Ilman Rekisteröintiä Evernomic สล็อต Kasino Kurko: Uudet nettikasinot Uudet Nettikasinot VanguardNGR France Casinos Sin Licencia En España Skilled Writers for In-Depth Academic Papers Masterpapers - Qualified writers delivering excellence in every word! Best Online Casinos Canada
Grademiners - Professional writers, original content, quality you can trust! České Online Casino: Hrajte Bezpečně a Výhodně v 2024 SS Market: Social Media Services Market Nettikasinot 2022 | Löydä Luotettava & Turvallinen Nettikasino! NonGamStopOdds casino sites Online sports betting and casino at Parimatch India Casinos not on GamStop | Casino-Wise.com Casinos not on GamStop UK 🏆 NonGamStopWager.com Best Online Casinos in Canada Instagram Growth Service Live Swap Betrouwbare online casino informatie
Legalne Kasyna Online w Polsce Buy TikTok Followers Acheter Des Likes Instagram Achat Abonnés Instagram Llikes Kaufen Instagram Echte Follower Kaufen Instagram Buy Instagram Likes buy linkedin followers casinos online fuera de España Movers to Puerto Rico Buy Real TikTok Views apuesdeportivas.es
Global Software Companies VanguardNGR Spain Buy Instagram Likes French Casinos Buy Fans No Deposit Bonus Codes Buy Instagram Followers - Bournemouth TopKasynoOnline PL super clone watches SocialDawn Write My Essay FaceFinder
LorkaAI Fun88 Vietnam EN FUN88 Thailand EN Purchase Real Telegram Members Humanize AI Buy YouTube Views casino utan svensk licens East Villa FC Casinos sans vérification Mosaic VPN For Chrome Fun88 Vietnam Time.now Worldwide Developer API
Ethereum Wiki MejoresCasinos Purchase Instagram Comments Buy Real Spotify Followers Transparencia en Casinos Online Fun88 Fun88 Thailand Buy Instagram Followers Buy Instagram Followers Buy Facebook Followers Buy Quality YouTube Subscribers Buy Instagram Reposts
Purchase Real Facebook Likes Casinos en ligne France Buy LinkedIn Followers New Casino Bonuses Buy TikTok Followers Purchase Real TikTok Likes Buy Instagram Likes Safely Buy Quality Instagram Followers buy youtube subscribers AI-Text-Humanizer.com aviator game สล็อต
Replica Factory DeContrabas Online casino ohne OASIS Online Casino Zonder Registratie Best Online Pokies in Australia Real Money Casinos Instagram Downloader CrawlJobs iDealeCasinos AUCrazyVegas Buy instagram Followers Buy Real Facebook Followers
trusted gaming sites on Slotozilla WriteHuman AI Humanizer Best Online Casino best replica watches Brecktic UK buy instagram followers Yahoo Finance - Super Clone Watches superclonewatch Buy Instagram Followers - IDS News gmkoutsi.com Releaf - Medizinischer Cannabis Shop Legit Casino
EuroCommpr fx取引とは Migliori Casino non AAMS in Italia 2025 fx取引とは online casino australia JokaCasino Remove negative information from the Internet | NonDetected.com king Johnnie Luotettavat nettikasinot 2025 Best New Online Casinos in 2025 Buy TikTok Followers SoftOrbits - Easiest Photo Editing Software for Beginners Super Clone Watches - Trusted Dealer For 1:1 Replica Watches
ゴールド取引 Buy Instagram Followers Super Clone Watches For Sale: Best Website for 1:1 Replica Watches humanize ai unaimytext Parhaat kasinot - Valitse turvallinen nettikasino Casino not on GamStop The Best Social Media Promotion Service Provider Trusted Source for Online Casino Info , Games, Guides , Reviews Buy Instagram Followers with Instant Delivery Buy YouTube Subscribers & Views UK Pistolo Casino Buy Tiktok Followers
Online Casino Ausland: Beste ausländische Online Casinos Kasyno online w Polsce Mejores Casinos Internacionales Online de España 2025 CasinoKennis casino online ellada Casinofy CasinoAllianz casinò online Italia DashTickets New Zealand gambling magazine Buy TikTok Followers O Καλύτερος Οδηγός Online Καζίνο Top online casino's van Nederland
Polskie Sloty RoboCat Casino Zamsino.com 🎖️ Global Online Gambling Guide Online Casinos Deutschland Casinos online em Portugal Betting Site Online Casino Nederland UK Casinos not on GamStop 2025 - nongamstopcasinos.net Guidebook.BetWinner ZonderCruks - Online Gokken Zonder CRUKS Mejores Casinos Sin Licencia en España SANCTIONS LAW FIRM
Interpol Law Firm try bookmakers not on GamStop Buy Instagram Followers & Likes Accelerating Your Software Products | Teravision Technologies Casino Magyar Gokken Online Greece Casinos Casino Bonussen Nederland Casino No deposit Bonus 2024 Buy Instagram Likes - Real Likes & Instant Delivery! Vedonlyontiyhtiot.com - Parhaat Vedolyöntiyhtiöt & Bonukset Purchase TikTok followers, likes and views
Buy Youtube Views Best Bitcoin Casinos Prointernet Nexus Smoke Premium E-Liquid and Luxury Vape Products 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 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 Nieuwe Online Casino's December 2022 | Overzicht van de top nieuwe casinos! cricket betting app WiserGamblers | Best Online Gambling Guide betting sider 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
VPN for Chrome to Make Web Surfing 100% Safe 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

Code Contributors

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

NPM DownloadsLast 30 Days