Skip to content

v3.4 • Motion • 4kb gzipped • MIT

SnapCarousel

A carousel built on CSS scroll snapping, with the accessibility work already done.

★ 2.2kGitHub
↓ 6.0k / week● MIT● TS 5.0+
snapcarousel-preview.png
Abstract preview graphic for SnapCarousel

// why snapcarousel

The browser does the scrolling

Momentum, snapping and touch handling come from the platform. The library adds controls, announcements and state.

● 60fps● 1ms frame cost● 0 deps

// stack

Announced correctly

Slide changes are reported to assistive technology, and controls are labelled with their destination.

SnapCarousel started as a single file in a client project and stayed small on purpose. It does one job, it does it in 4kb gzipped, and it has no runtime dependencies.

Getting started

Install it, import it, call it:

npm i snapcarousel-js

Momentum, snapping and touch handling come from the platform. The library adds controls, announcements and state.

What it does not do

It does not manage your state, style your components or ship a plugin system. Those are your decisions, and keeping them out is what keeps the bundle honest.

  • Native snap points
  • Live slide announcements
  • MIT licensed, commercially friendly

Features

Native snap points

No transform maths, no scroll hijacking, no inertia to reimplement.

Live slide announcements

Position changes are announced politely without interrupting reading.

Respects reduced motion

Reads the user preference and falls back to an instant state change.

ESM and types

Ships module and CommonJS builds with hand-written type definitions and source maps.

Sixty frames, measured

Performance is asserted in CI against a recorded trace, not assumed.

Compositor friendly

Animates transform and opacity only, so nothing triggers layout.

Get SnapCarousel v3.4

6 files • .min.js 4kb • .zip 26kb • sha384 verified

Changelog

v3.4 Sep 23 2025 • latest
  • Live region slide announcements
  • Autoplay pauses on focus
  • Loop mode without cloned nodes
v3.3.1 Jun 24 2025
  • Node 18 is now the minimum supported version
  • CommonJS build restored for older bundlers
v3.3 Mar 24 2025
  • Reworked the public API for consistency
  • Deprecated helpers removed
View full archive →

// related

Related products

Sep 10 • v2.0

ChartForge

Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.

View →
Aug 30 • v3.2.1

MotionEase

Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.

View →
Aug 19 • v1.9.4

FormFlow

Validation and multi-step logic that works the same in React, Vue and vanilla. Your markup stays yours.

View →

Make it move today.

MIT licensed. Commercial friendly. Five-minute setup.