slider reactjs code example

Example: how to use nivo slider in react

//how to use nivo carousel in ReactJS

// below is App.js

// import jquery

import jQuery  from 'jquery';

// launch function
jQuery(document).ready(function(){
    jQuery('#slider').nivoSlider({
        prevText: '',
        nextText: '',
        controlNav: false,
        pauseOnHover: false,
        pauseTime: 6000,
        animSpeed: 1500
    });
});

// copy and paste the nivo carousel jQuery version's code here.
//here
// end of App.js

// on the component
<div className="container-fluid vh-100 banner-box">
  <div  id="slider"  className="nivoSlider templatemo_slider">
    <img src="img/0.jpg" alt="img"/>
    <img src="img/1.jpg" alt="img"/>
    <img src="img/2.jpg" alt="img"/>
    <img src="img/3.jpg" alt="img"/>
  </div>
</div>