react-gallery-slider

1.0.2 • Public • Published

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 📄

MIT

Made by Karol Waliszewski with ❤️

Readme

Keywords

none

Package Sidebar

Install

npm i react-gallery-slider

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

343 kB

Total Files

14

Last publish

Collaborators

  • karol-waliszewski