Simple and convenient photo slider for your application! This component is basing on CSS snap-scroll property 💥
Install with npm:
npm install --save react-gallery-slider
or
Install with yarn:
yarn add react-gallery-slider
const React = require('react');
const ReactDOM = require('react-dom');
const GallerySlider = require('react-gallery-slider');
const Photo = require("./img.jpg");
var photos = ["some url", Photo];
ReactDOM.render(
<GallerySlider photos={photos} />,
document.getElementById('container')
)
ES6
import React from "react";
import ReactDOM from 'react-dom';
import PhotoSlider from "./react-photo-slider";
import Photo from "./img.jpg";
var photos = ["some url", Photo];
ReactDOM.render(
<GallerySlider photos={photos} />,
document.getElementById('container')
)
-
photos
- (array) Array of photos' urls (required) -
activePhoto
- (number) Index (starting from 0) of the current photo. -
className
- (string) Class name of the container element. -
style
- (object) Inline styles of the gallery container.
Made by Karol Waliszewski with ❤️