Giter VIP home page Giter VIP logo

react-slideshow-ui's Introduction

React SlideShow UI

GitHub license Join the chat at https://gitter.im/shisama/react-slideshow-ui Dependency Status devDependency Status npm

React UI Component for slideshow like SlideShare or SpeakerDeck.

NPM

React SlideShow

Demo(Updated with every release)

Installation

npm install --save react-slideshow-ui

Usage

import React from 'react';
import {render} from 'react-dom';
import SlideShow from 'react-slideshow-ui';

class App extends React.Component {
  render() {
    return (
      <div>
        <SlideShow
          style={{width: 400}}
          images={[
            './img/example1.png',
            './img/example2.png',
            './img/example3.png',
          ]}
          withTimestamp={true}
          pageWillUpdate={(index, image) => {
            console.log(`Page Update! index: ${index}, image: ${image}`);
          }}
        />
      </div>
    );
  }
}

render(<App />, document.getElementById('slideshow'));

Props

name type reqired description
style Object Yes style of this component. This object is immutable.
images Array<string> Yes url strings of images for slide.
prevIcon Dom No icon for button to move previous page.
nextIcon Dom No icon for button to move next page.
withTimestamp boolean No set true if you want to add timestamp to img url. i.e. example.png?1483228800
pageWillUpdate function No function that is invoked when the page is turned over.
showFullscreenIcon boolean No is icon to toggle fullscreen shown? default:true
className string No className of this component. default:slideshow

Browser Support

Chrome@latest Firefox@latest Safari@latest IE11

License

This project is licensed under the terms of the MIT license

react-slideshow-ui's People

Contributors

shisama avatar

Watchers

Trending Technology avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.