
Company News
Socket Named to Rising in Cyber 2026 List of Top Cybersecurity Startups
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.
react-native-image-slider
Advanced tools
A quick and easy image slider for react native.

npm install react-native-image-slider --save
or
yarn add react-native-image-slider
import ImageSlider from 'react-native-image-slider';
// ...
render() {
return (<ImageSlider images={[
'http://placeimg.com/640/480/any',
'http://placeimg.com/640/480/any',
'http://placeimg.com/640/480/any'
]}/>)
}
class Example extends Component<{}> {
render() {
const images = [
'https://placeimg.com/640/640/nature',
'https://placeimg.com/640/640/people',
'https://placeimg.com/640/640/animals',
'https://placeimg.com/640/640/beer',
];
return (
<SafeAreaView style={styles.container}>
<View style={styles.content1}>
<Text style={styles.contentText}>Content 1</Text>
</View>
<ImageSlider
loopBothSides
autoPlayWithInterval={3000}
images={images}
customSlide={({ index, item, style, width }) => (
// It's important to put style here because it's got offset inside
<View key={index} style={[style, styles.customSlide]}>
<Image source={{ uri: item }} style={styles.customImage} />
</View>
)}
customButtons={(position, move) => (
<View style={styles.buttons}>
{images.map((image, index) => {
return (
<TouchableHighlight
key={index}
underlayColor="#ccc"
onPress={() => move(index)}
style={styles.button}
>
<Text style={position === index && styles.buttonSelected}>
{index + 1}
</Text>
</TouchableHighlight>
);
})}
</View>
)}
/>
<View style={styles.content2}>
<Text style={styles.contentText}>Content 2</Text>
</View>
</SafeAreaView>
);
}
}
imagesrendered images
customButtonsfunction returns custom pagination buttons component, it's got position index and move to position function as arguments
customSlidefunction returns Node with arguments index - images list index, item - anything you pass inside images prop, style - for top component of your custom slide, width - calculated slide width
autoPlayWithIntervalactivates autoplay when passed (it uses milliseconds)
loop[BUGGY ON ANDROID] loops scroll of images, but in one direction only
loopBothSides[IOS ONLY] same as loop, but does it in any direction
onPositionChangedcalled when the current position is changed
positionused for controlled components
onPressreturns an object with image url and index of image pressed
stylestyles ScrollView inside ImageSlider, you may pass height here (100% by default)
MIT
FAQs
A easy to use image slider for React Native
The npm package react-native-image-slider receives a total of 539 weekly downloads. As such, react-native-image-slider popularity was classified as not popular.
We found that react-native-image-slider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.

Research
Socket detected 84 compromised TanStack npm package artifacts modified with suspected CI credential-stealing malware.

Security News
A dispute over fsnotify maintainer access set off supply chain alarms around one of Go’s most widely used filesystem libraries.