2.0.3 • Published 3 months ago

react-pro-carousel v2.0.3

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

react-pro-carousel

Carousel component built with React.

Installation

npm

npm install react-pro-carousel --save

yarn

yarn add react-pro-carousel

Import css files

import "react-pro-carousel/dist/style.css";

Example

import React from "react";
import { CarouselWrapper, Item, ICarouselWrapperConfig} from "react-pro-carousel";


const App = () => {
  const config: ICarouselWrapperConfig = {
    height: 200,
    responsive: {
      sm: {
        breakPoint: 500,
        itemPerScreen: 2,
      },
    },
    arrow: false,
  };

  return (
      <CarouselWrapper config={config}>
        <Item>
          <div>1</div>
        </Item>
        <Item>
          <div>2</div>
        </Item>
        <Item>
          <div>3</div>
        </Item>
        <Item>
          <div>4</div>
        </Item>
      </CarouselWrapper>
  );
};

export default App;