1.0.10 • Published 6 months ago

mui-image-slider v1.0.10

Weekly downloads
30
License
ISC
Repository
github
Last release
6 months ago

MUI-Image-Slider - Image Slider for Material UI

npm version NPM Downloads Coverage Status Build Status

MUI-Image-Slider is an image slider component built on Material-UI.

Demo

You can access the live demo here

Install

npm install mui-image-slider --save

Usage

import MuiImageSlider from 'mui-image-slider';

const images = [
    'https://homepages.cae.wisc.edu/~ece533/images/airplane.png',
    'https://homepages.cae.wisc.edu/~ece533/images/arctichare.png',
    'https://homepages.cae.wisc.edu/~ece533/images/baboon.png',
    'https://homepages.cae.wisc.edu/~ece533/images/barbara.png',
];

<MuiImageSlider images={images}/>

API

NameTypeDefaultDescription
imagesArrayList of images' url string.
classesObjectOverride or extend the styles applied to the component. See CSS API below for more details.
customArrowFunctionRender a custom arrow component.
onArrowClickFunctionCallback to an arrow click. function(currentImage: Number) {console.log(currentImage} where currentImage is the index of the currently visible image.
arrowsBooleantrueShow/Hide navigation arrows.
autoPlayBooleanfalseAutoplay the images like a slideshow.
arrowsColorStringdimgreyColor of the arrows.
arrowsBgColorStringtransparentColors of the arrows wrapper (Background).
arrowsBgHoverColorString#B9B9B95EColors of the wrapper on hover.
alwaysShowArrowsBooleanfalseArrows will always be visible.
fitToImageHeightBooleanfalseComponent height is adaptive to the current image's height.

Classes Object

Rule NameDescription
rootStyles applied to the root element.
wrapperStyles applied to the wrapper element.
arrowWrapperStyles applied to the arrowWrapper element.
imgStyles applied to each img element.

Contributing

Thanks for taking an interest in the library and the github community!

The following commands should get you started:

npm install
npm start

open http://localhost:3001/ in browser

Testing

To run the tests locally just run jest in the root folder

jest

License

The files included in this repository are licensed under the ISC license.

1.0.9

6 months ago

1.0.8

6 months ago

1.0.10

6 months ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago