1.0.2 • Published 3 years ago

react-coverfl0w v1.0.2

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

React Coverfl0w

npm version gzip size

npm.io

Installation

To install, you can use npm or yarn:

$ npm install --save react-coverfl0w

API documentation

NameTypeDefaultDescription
imagesImage[]Array of Images {src, href, alt}
classNamestringAdd css class to the coverflow for customization
slidesPerSidenumberNumber of images displayed on either side of the center
rotationnumber45Rotation in degrees for inactive images
opacityIntervalboolean1, 0.8, 0.5, 0.2Define how you want images to "fade" out on the side
scaleIntervalboolean1, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1Define how you want images to scale down in size

Usage

import { Coverflow, Images } from "react-coverfl0w";

const IMAGES: Images[] = [
  {
    src:
      "myimage.png",
    href: "https://www.test.com",
    alt: "alt"
  },
  {
    src:
      "myimage.png",
    href: "https://www.test.com",
    alt: "alt"
  },
];

function App() {
  return (
    <div className="App">
      <div className="content">
        <Coverflow images={IMAGES} slidesPerSide={3} />
      </div>
    </div>
  );
}

Demos