Last active
February 28, 2023 06:18
-
-
Save leandrowd/b8a9385b0b4b03054dc5 to your computer and use it in GitHub Desktop.
carousel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.npmjs.com/package/react-responsive-carousel | |
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Carousel = require('react-responsive-carousel').Carousel; | |
var DemoCarousel = React.createClass({ | |
render() { | |
return ( | |
<Carousel showArrows={true} onChange={onChange} onClickItem={onClickItem} onClickThumb={onClickThumb}> | |
<div> | |
<img src="assets/1.jpeg" /> | |
<p className="legend">Legend 1</p> | |
</div> | |
<div> | |
<img src="assets/2.jpeg" /> | |
<p className="legend">Legend 2</p> | |
</div> | |
<div> | |
<img src="assets/3.jpeg" /> | |
<p className="legend">Legend 3</p> | |
</div> | |
<div> | |
<img src="assets/4.jpeg" /> | |
<p className="legend">Legend 4</p> | |
</div> | |
<div> | |
<img src="assets/5.jpeg" /> | |
<p className="legend">Legend 5</p> | |
</div> | |
<div> | |
<img src="assets/6.jpeg" /> | |
<p className="legend">Legend 6</p> | |
</div> | |
</Carousel> | |
); | |
} | |
}); | |
ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel')); | |
// Don't forget to include the css in your page | |
// <link rel="stylesheet" href="carousel.css"/> | |
// Begin DemoSliderControls |
i d'ont understand how to use this code
Can you explain?
when i put this code?
Am i need to write the function 'onChange' ?
I can't use this code.
Could you explain me?
I cant use this code. I think you should give us an explanation about a little bit xD
Where can I get the css codes for this project?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where is your onChange, do you have to provide it or is that built into react-responsive-carousel?