Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to add carsoul to react project

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
import { Carousel } from 'react-responsive-carousel';

class DemoCarousel extends Component {
    render() {
        return (
            <Carousel>
                <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>
            </Carousel>
        );
    }
}

ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel'));

// Don't forget to include the css in your page

// Using webpack or parcel with a style loader
// import styles from 'react-responsive-carousel/lib/styles/carousel.min.css';

// Using html tag:
// <link rel="stylesheet" href="<NODE_MODULES_FOLDER>/react-responsive-carousel/lib/styles/carousel.min.css"/>
Comment

PREVIOUS NEXT
Code Example
Javascript :: splinter wait for input 
Javascript :: react call component state 
Javascript :: avascript-how-to-detect-if-a-word-is-highlighted 
Javascript :: linked list distance between two nodes 
Javascript :: React img element rating 
Javascript :: jquery split multidimensional array 
Javascript :: get call log in react native with filter android 
Javascript :: strapi login api location 
Javascript :: remove image Input of element 
Javascript :: TYPING TEXT USING JS1 
Javascript :: moment js days ago 
Javascript :: parent.containts js 
Javascript :: ES5 Assigning Variables to Object Properties 
Javascript :: get members of a group graph pnp js 
Javascript :: Failed: Template parse errors: There is no directive with "exportAs" set to "ngModel" karma 
Javascript :: how stop users from submitting empty input in todo list javascript 
Javascript :: Remove all index from array except the one jquery 
Javascript :: Installation de react native maps bibliothèque 
Javascript :: JS uramy8e7jth6klryes8hrd8utduf6kgiyes48w7iy6rdjfcghe49u 
Javascript :: unexpected token useeffect react native 
Javascript :: javascript element.children.forEach not working 
Javascript :: GetValueWithDataAttr 
Javascript :: get-the-current-directory-name-in-javascript 
Javascript :: Uncaught TypeError: table.fnColReorder.transpose is not a function 
Javascript :: Assign arrow function to a variable before exporting as module default 
Javascript :: object.keys map 
Javascript :: concatenate strings jsonata 
Javascript :: form handling in next js 
Javascript :: react pass object to state 
Javascript :: 00979fb28f7cc517ff28c035bb8ef10698d0d991304e9901ba214ad0cada69ef:script- 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =