1.7.0 • Published 3 years ago

react-customize-carousel v1.7.0

Weekly downloads
7
License
ISC
Repository
github
Last release
3 years ago

react-customize-carousel

Source code at https://github.com/weianofsteel/react-customize-carousel

Installation

npm install --save react-customize-carousel

or

yarn add react-customize-carousel

Usage

import React from 'react';
import CustomizeCarousel from 'react-customize-carousel';
import img1 from '../public/img1.jpg';
import img2 from '../public/img2.jpg';
import img3 from '../public/img3.jpg';
import img4 from '../public/img4.jpg';

function Demo(){
    return(
        <React.Fragment>
            <div>
                <CustomizeCarousel
                    imgsrc={[img1, img2, img3, img4]}
                    rotateBy={2}
                    width={'600px'}
                    height={'500px'}
                    navigateButton={true}
                    controlButton={true}
                />
            </div> 
        </React.Fragment>
    )
}

export default Demo;

Props

NameTypeDefaultDescription
imgsrcimg1, img2, img3 It's an array, put the name of image you imported as
(array)element.
rotateBynumber3How many seconds your carousel rotate.
widthstring'600px'Defines width for image in carousel
heightstring'500px'Defines height for image in carousel
navigateButtonboolingnullRadio navigate shows up when navigateButton set to true
controlButtonboolingnullControl button shows up when controlButton set to true
1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago