A flexible React Native carousel component that renders any content - images, text, or custom components.
npm install react-native-universal-carousel
import { UniversalCarousel } from 'react-native-universal-carousel';
import { View, Text } from 'react-native';
const MyComponent = () => {
const items = [
{ id: 1, title: 'Slide 1' },
{ id: 2, title: 'Slide 2' },
{ id: 3, title: 'Slide 3' },
];
return (
<UniversalCarousel
items={items}
renderItem={({ item }) => (
<View>
<Text>{item.title}</Text>
</View>
)}
autoplay={true}
autoplaySpeed={3000}
/>
);
};
To see the carousel in action on your mobile device:
cd mobile-demo
npm install
npm start
Then scan the QR code with Expo Go app on your phone.
- ✅ Auto-play with customizable speed
- ✅ Touch/swipe gestures
- ✅ Navigation arrows
- ✅ Slide indicators
- ✅ Infinite loop
- ✅ Custom content rendering
- ✅ Smooth animations
- ✅ Mobile-optimized
npm run build
MIT