@ginioo/simple-carousel

a simple carousel for images or else

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@ginioo/simple-carousel
1.0.34 years ago5 years agoMinified + gzip package size for @ginioo/simple-carousel in KB

Readme

@ginioo/simple-carousel

a simple carousel for images or else

  1. install
npm i -D @ginioo/simple-carousel

  1. add ImageCarousel to a component
import React, {Component} from 'react';
import {ImageCarousel} from '@ginioo/simple-carousel';

class SampleComponent extends Component {

  render() {
    return (
      <div id="sample">
        // default slide to the right
        <ImageCarousel src="http://via.placeholder.com/350x150" />
        
        <ImageCarousel slide="left" src={[
            "http://via.placeholder.com/350x150",
            "http://via.placeholder.com/350x150",
        ]} />
      </div>
    );
  }
}

export default SampleComponent;

  1. define #simple-carousel height and width
#simple-carousel {
  width: 1024px;
  height: 440px;
}