v3.4 • Motion • 4kb gzipped • MIT
SnapCarousel
A carousel built on CSS scroll snapping, with the accessibility work already done.

// why snapcarousel
The browser does the scrolling
Momentum, snapping and touch handling come from the platform. The library adds controls, announcements and state.
// 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
- Live region slide announcements
- Autoplay pauses on focus
- Loop mode without cloned nodes
- Node 18 is now the minimum supported version
- CommonJS build restored for older bundlers
- Reworked the public API for consistency
- Deprecated helpers removed
// related
Related products
ChartForge
Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.
View →MotionEase
Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.
View →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.