All Projects → loadingwyn → react-imageViewer

loadingwyn / react-imageViewer

Licence: MIT license
React component for image displaying in full screen

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to react-imageViewer

Picview
Fast Picture Viewer with compact UI, that can be hidden. Features image effects, galleries, image info and more. The app can automatically adjusts itself to your screen.
Stars: ✭ 259 (+324.59%)
Mutual labels:  viewer, image-viewer
Mulimgviewer
MulimgViewer is a multi-image viewer that can open multiple images in one interface, which is convenient for image comparison and image stitching.
Stars: ✭ 57 (-6.56%)
Mutual labels:  viewer, image-viewer
Viewerjs
JavaScript image viewer.
Stars: ✭ 6,270 (+10178.69%)
Mutual labels:  viewer, image-viewer
Keen Slider
The HTML touch slider carousel with the most native feeling
Stars: ✭ 3,097 (+4977.05%)
Mutual labels:  touch, carousel
react-cool-virtual
😎 ♻️ A tiny React hook for rendering large datasets like a breeze.
Stars: ✭ 1,031 (+1590.16%)
Mutual labels:  hook, carousel
Vudit
A file viewer for Android
Stars: ✭ 40 (-34.43%)
Mutual labels:  viewer, image-viewer
Rdimageviewercontroller
Simple viewer not only image but also custom view.
Stars: ✭ 49 (-19.67%)
Mutual labels:  viewer, image-viewer
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (-57.38%)
Mutual labels:  touch, carousel
Quick Picture Viewer
🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.
Stars: ✭ 237 (+288.52%)
Mutual labels:  viewer, image-viewer
Jquery Viewer
A jQuery plugin wrapper for Viewer.js.
Stars: ✭ 235 (+285.25%)
Mutual labels:  viewer, image-viewer
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: ✭ 2,046 (+3254.1%)
Mutual labels:  touch, carousel
oculante
A minimalistic crossplatform image viewer written in rust
Stars: ✭ 169 (+177.05%)
Mutual labels:  viewer, image-viewer
Embla Carousel
A lightweight carousel library with fluid motion and great swipe precision.
Stars: ✭ 1,874 (+2972.13%)
Mutual labels:  touch, carousel
saccade
A sophisticated scientific image viewer for Linux with OpenGL support and synchronized viewports
Stars: ✭ 38 (-37.7%)
Mutual labels:  viewer, image-viewer
Hammer Slider
DISCONTINUED - HammerSlider touch is a lightweight infinite carousel plugin.
Stars: ✭ 21 (-65.57%)
Mutual labels:  touch, carousel
Viewer
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-viewer
Stars: ✭ 985 (+1514.75%)
Mutual labels:  viewer, image-viewer
Vue Gallery
📷 Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers.
Stars: ✭ 405 (+563.93%)
Mutual labels:  touch, carousel
Swiper
Most modern mobile touch slider with hardware accelerated transitions
Stars: ✭ 29,519 (+48291.8%)
Mutual labels:  touch, carousel
Wiv
Window image viewer [DEPRECATED]
Stars: ✭ 196 (+221.31%)
Mutual labels:  viewer, image-viewer
React Swipeable
React swipe event handler hook
Stars: ✭ 1,348 (+2109.84%)
Mutual labels:  hook, touch

React Image Viewer

version

React-slides@3 has been rewriten with React Hooks and all apis of it have been redesigned. If you are using React-slides@2, please read api docs carefully.

Example

demo

Edit focused-resonance-oxzgn

Features

  • Support multi-touch and mouse gestures (powered by Alloyfinger)
  • High performance(no unneccessary rendering)

Get Started

  1. Run yarn add react-imageslides react react-dom alloyfinger

    The package has peer dependencies on react@^17.0.0, react-dom@^17.0.0 and alloyfinger.

  2. Render it!

import React, { useState, useCallback } from 'react';
import ReactDOM from 'react-dom';
import Gallery from 'react-imageslides';
import 'react-imageslides/lib/index.css';

const images = [
  'http://dingyue.nosdn.127.net/0UDLpU6BsCNm9v9OpT0Dhn=nHKJFC6SMByz8bMWxFM=1t1531988836046compressflag.jpeg',
  'http://dingyue.nosdn.127.net/9sFTTWDQoHjxyIkU9wzm8CiDNVbq48Mwf2hyhgRghxA5O1527909480497compressflag.jpeg',
  'http://dingyue.nosdn.127.net/eSJPDtcP9NBvEOIMPyPLxwpJSZIu4D36qDss2RGQjNHBp1531990042001compressflag.jpeg',
  'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1503235534249&di=4c198d5a305627d12e5dae4c581c9e57&imgtype=0&src=http%3A%2F%2Fimg2.niutuku.com%2Fdesk%2Fanime%2F0529%2F0529-17277.jpg',
];
export default function App() {
  const [activeIndex, setActiveIndex] = useState(0);

  const handleChange = useCallback(newIndex => {
    setActiveIndex(newIndex);
  }, []);
  return <Gallery isOpen images={images} index={activeIndex} onChange={handleChange} />;
}
ReactDOM.render(<App />, document.getElementById('root'));

Apis

Property Type Required Description
images array yes Image urls to display
onChange func yes Callback fired when the index changes
isOpen bool yes Whether the component is open
index number yes Index of the first image to display
loadingIcon node Placeholder when image is loading
onClick func Callback fired when user clicks gallery
onKeyPress func Callback fired when user press down any key
onSingleTap func Callback fired when user taps gallery
imageRenderer func Render prop to custom image element
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].