My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Image slider package is not working

Irfan Sayed's photo
Irfan Sayed
·May 31, 2020

Hello, I am using npm image slider package : npmjs.com/package/react-simple-image-slider

This package has the property : slideDuration and i am using this property in my code. however, it is not working. Rest of the properties are working.

here is the code for this:

import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import ReactBootstrap, { Jumbotron, Container, Row, Col, Column, Image, Button } from 'react-bootstrap';
import SimpleImageSlider from "react-simple-image-slider";


class Homepage extends Component {
  render() {
    const images = [
            { url: '../../Assets/images/img_bg_1.jpg' },
            { url: '../../Assets/images/img_bg_2.jpg' },
            { url: '../../Assets/images/img_bg_3.jpg' },
        ];

    return (

      <div>
               <SimpleImageSlider
                   width={896}
                   height={504}
                   images={images}
                   slideDuration={0.1}
               />
           </div>

  );
  }
}

export default Homepage;

I am not sure where is the issue. can someone please suggest where i can get the support. ? Thanks