1.0.2 • Published 7 years ago
react-gallery-slider
Licence
MIT
Version
1.0.2
Deps
0
Size
335 kB
Vulns
0
Weekly
0
React Gallery Slider
Simple and convenient photo slider for your application! This component is basing on CSS snap-scroll property
Installation
Install with npm:
npm install --save react-gallery-slider
or
Install with yarn:
yarn add react-gallery-slider
Getting Started
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')
)
Options
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.
License
Made by Karol Waliszewski with