react-swipeable-views is a React component that switches between child views with swipe gestures. The browser build is small and lazy-loads slides after the first.
Overview
react-swipeable-views wraps multiple React children in a horizontally swipeable container suited to mobile-style navigation patterns such as tabs or onboarding steps. The intended experience is tested from real or emulated mobile browsers.
The package publishes separate browser and experimental React Native implementations sharing the same API surface. Maintainers note native support is experimental without active roadmap commitment, favoring lower-level cross-platform sharing in the future.
The browser bundle stays under about ten kilobytes gzipped, renders the first slide immediately, and defers loading additional slides until needed. Documentation covers installation, a simple usage example, component API reference, and hosted demos.
Consumers install via npm for web projects. Doctolib is cited as a production user. The project is MIT licensed.
Key features
- Horizontal swipe between React children
- Small gzipped browser bundle
- Lazy loading after first slide
- Documented component API
- Interactive mobile demos
- Separate experimental React Native build
- npm package for browser apps
Use cases
- Mobile web tabbed interfaces
- Onboarding step carousels
- Touch-friendly content pagers
- React apps needing swipe navigation