Giter Site home page Giter Site logo

react-hooks-image-slider's Issues

Reset the Interval

My opinion, if click on the next button (autoplay on), it should restart the interval. WDYT?

Stop autoplay

My initial idea is to let the parent component that contains the Slider control whether autoplay is active. That would require setting autoPlay to a state variable. You'd end up passing the autoPlay variable, and a function to stop autoplay down to the Slider as props. The nextSlide and prevSlide functions would then need to have additional logic added to handle stopping the autoplay by executing the function passed down as props.

Perhaps instead, you could display some type of icon that would allow the user to toggle autoplay by clicking on it. We wouldn't attach that functionality to the arrows at all, removing the necessity of refactoring are prevSlide and nextSlide function.

Let me know what your ideas are.

Responsive translate

Hello, I found a issue when I resize the window or container of slide.

The scenarie is:

  • Load slide in the screen
  • After click in arrow right to traslate the current slide
  • Then resize the window or dimensions of container
  • Then you can see that the currrent value of translateX are not is valid, because the slide are not visible correctly

image

Overlaping component

When used as child components, the slider overlaps.That is overflows What should i do?

Multiple sliders on the same page

When trying to use two (or more) sliders at the same time, the last one works properly but any other one transitions back and forth to active slide when arrows are clicked. I don't know why but smoothTransition is called twice so it transitions, then the slides are updated and then it transitions again.

Any clue on why is this happening?

autoplay

whoops. need to pass autoplay via redux prop in settings

Multiple images per slide

I am thinking that we might want to use real <img /> elements instead of a div that sets the images as a background.

For example:
Let's say you want 3 images per slide, you could then use the srcset attribute to show different sized images dependent on the width of the browser. This would require the developer(s) to create multiple copies of their images at different sizes prior to utilizing the Slider properly.

I think at least at first glance this is a decent idea, as it accounts for performance and won't load large image files on smaller devices.

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.