Guide · Alternatives

Swiper alternatives for vanilla JS, compared

Swiper is the safe default and still the most complete carousel on npm. But most sliders only need slides, controls and sane accessibility — and that is where a smaller engine earns its keep. Here is how the main alternatives differ.

Updated 2026-11-229 min readLive demo

What actually matters

Bundle costWhat you ship on every page load, including the CSS and the modules you enable.
Accessibility defaultsWhether roles, labels, live regions and focus isolation work without extra code.
LifecycleWhat happens on teardown in a SPA, and whether your original markup returns.

Swiper wins on breadth: virtual slides, dozens of effects and modules, and official wrappers for React, Vue and Web Components. If you need those, stop here and use Swiper. The comparison below is for sliders where that surface is more than you want to maintain.

The comparison

LibraryJS min+gzipAccessibility defaultsAnimationsTypeScriptDownloads / week
Zikra Slider Pro16.6 kB + 1.9 kB CSSRoles, slide labels, live region, inert off-screen slides, keyboard, reduced motion — on by defaultGSAP / anime.js / Motion → WAAPI → CSS ladderbuilt-in443
Swiper 1420.5 kB core, modules extraOpt-in a11y module: live region and inertbuilt-inbuilt-in5.51M
Splide 415.8 kBWAI-ARIA carousel pattern, live region, keyboard — no inertbuilt-inbuilt-in415k
Embla 86.9 kBNot documented — write your own markupCSSbuilt-in31.8M
Glide 37.8 kBKeyboard onlyCSSnone183k
Keen 65.9 kBNot documentedCustom animatorbuilt-in305k

Sizes come from Bundlephobia's default entry for each package; Swiper's excludes optional modules, while Zikra's includes every layout and control. Download counts are the npm downloads API for the week ending 2026-11-21. All six are MIT-licensed.

How to read it

  • Embla and Keen are smaller because they are primitives. You get dragging and snapping, then you build arrows, bullets and accessible markup yourself. That is a feature, not a flaw — if you already have a design system, it is the cleanest path.
  • Splide is the closest accessibility peer. Its WAI-ARIA carousel pattern is mature and documented; it does not isolate off-screen slides with inert.
  • Swiper's a11y module is excellent but opt-in. If a teammate forgets the module or an import, the carousel silently loses announcements and focus isolation.
  • Zikra sits in the middle. It is bigger than Embla or Keen because it includes controls, seven layouts, accessibility behavior and the animation ladder — but smaller than Swiper core plus the modules most projects enable.

A live vanilla replacement

This slider is the engine initialized with three options' worth of code. Arrows and bullet pagination are on by default; accessibility roles, labels, the polite live region and keyboard support need no configuration.

Layered indigo artwork

No module system

one script tag, one stylesheet

Layered teal artwork

Accessible by default

labels, live region, inert

Layered amber artwork

Clean teardown

destroy() restores your DOM

const slider = zikraslider('#hero', {
  type: 'slide',
  loop: true,
  slidesPerView: 1
});

// later, in a SPA route change
slider.destroy(); // original classes, ids, ARIA and styles return

When to stay with Swiper

Choose Swiper if you need virtual slides for thousands of items, one of its extra effects (cube, flip, creative), Angular/Svelte wrappers, or a large ecosystem of plugins and Stack Overflow answers. Migration is only worth it when your slider is a small part of the page and you want the engine to be a small part of your bundle.

Frequently asked questions

Is Zikra Slider Pro a drop-in replacement for Swiper?

No. The APIs are different, so a Swiper configuration has to be mapped option by option and re-tested. Simple sliders move quickly, but it is not a find-and-replace.

Which is the smallest Swiper alternative?

By raw bundle size, Keen Slider (5.9 kB gzipped) and Embla (6.9 kB) are smaller because they ship fewer features and leave controls and accessibility markup to you. Zikra is 16.6 kB gzipped including seven layouts, controls, accessibility defaults and the animation ladder.

Does Zikra support the effects I use in Swiper?

It ships slide, fade, scale, coverflow, stack, cards and a custom transform layout. Swiper also has cube, flip and creative effects, which Zikra does not implement.

Can I migrate a Swiper slider without rewriting the markup?

Usually the markup carries over. Zikra works on direct slide children and snapshots your classes, ids and inline styles on init. The JavaScript API differs, so options and event handlers need to be mapped and leftover Swiper classes and wrappers should be removed first.