How to Add Image Slider Box in React Native?

Published On: 07/07/2022 | Category: React Native

Hi Guys,

This example is focused on how to add image slider box in react native. We will look at example of react native image slider box example. This article will give you simple example of how to use image slider box in react native. if you have question about how to implement image slider box in react native then I will give simple example with solution. So, let's follow few step to create example of how to create image slider box in react native.

Let's start following example:

Step 1: Download Project

In the first step run the following command to create a project.

expo init ExampleApp
Step 2: Install and Setup

First of all you have to install react-native-image-slider package.

npm install react-native-image-slider-box --save
Step 3: App.js

In this step, You will open the App.js file and put the code.

import React from 'react';
import { StatusBar, StyleSheet, View } from 'react-native';
import { SliderBox } from 'react-native-image-slider-box';

const App = () => {
    const [images, setImages] = React.useState([

    return (
        <View style={styles.container}>
                onCurrentImagePressed={index => console.warn(`image ${index} pressed`)}
            <StatusBar />

const styles = StyleSheet.create({
    container: {
        backgroundColor: 'white',
        paddingTop: 10,
        flex: 1,

export default App;
Run Project

In the last step run your project using the below command.

expo start

You can QR code scan in Expo Go Application on mobile.

Output :

It will help you...