Git Product home page Git Product logo

Comments (9)

jossmac avatar jossmac commented on July 21, 2024

Absolutely. This needs some planning, but is something that's been on my mind for a while

from react-images.

neptunian avatar neptunian commented on July 21, 2024

Flickr also implements this in context of a lightbox instead of gallery :
https://www.flickr.com/photos/neptunian/28167115654/in/photostream/

from react-images.

jossmac avatar jossmac commented on July 21, 2024

That's a nice implementation, I like the subtle drop shadow when the thumbnails are enlarged. Also, great shot πŸ˜‰

from react-images.

GregoryPotdevin avatar GregoryPotdevin commented on July 21, 2024

Quick and basic test : http://tamago.fr/react-images/

image

Scrolls (not automatically yet) when there are too many thumbnails, uses "thumbnail" instead of "src" if given. Added onClickThumbnail (like onClickPrev/Next).

Could be easily changed to a "paginated" version like Flickr.

from react-images.

jossmac avatar jossmac commented on July 21, 2024

Dude, that's awesome! Looking forward to the PR

from react-images.

GregoryPotdevin avatar GregoryPotdevin commented on July 21, 2024

Just updated the version to also a second Thumbnails components : PaginatedThumbnails

image

In my current fork the thumbnails component can be passed to Lightbox, so you can write stuff like

<Lightbox 
    images={...}
    thumbnails={PaginatedThumbnails} />

If you need to pass some props to the thumbnail component, you can do it like this (not very intuitive)

<Lightbox 
    images={...}
    thumbnails={(props) => <PaginatedThumbnails {...props} offset={5} />} />

The code for this one is more complicated as it has some internal state to manage the "current page".

I guess I can do a PR, but it probably needs some discussion to see what API suits you best.

from react-images.

GregoryPotdevin avatar GregoryPotdevin commented on July 21, 2024

@jossmac do you have a gitter for this project ? I'll be doing some open source image components for my company and wanted to see if it's something that could be added to react-images or should be a separate project.

from react-images.

jossmac avatar jossmac commented on July 21, 2024

Just created https://gitter.im/react-images/Lobby

Yeah that'd be great. Just let me know what you're building and hopefully it can find its way back into this repo for the community πŸ˜„

from react-images.

infacq avatar infacq commented on July 21, 2024

+1

from react-images.

Related Issues (20)

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.