rcaferati / react-awesome-slider

React content transition slider. Awesome Slider is a 60fps, light weight, performant component that renders an animated set of production ready UI general purpose sliders with fullpage transition support for NextJS and GatsbyJS. 🖥️ 📱
https://fullpage.caferati.me
MIT License
2.94k stars 296 forks source link

Can I set up my own 'Bullets' #156

Open h1sashin opened 3 years ago

h1sashin commented 3 years ago

As in title, can I use my own 'bullets' instead of using these build in? I tried something like ref.current.currentIndex but ony function that works for me was ref.current.nextSlide(). I haven't spotted anything in about it in documentation.

upta commented 3 years ago

I used to have a custom-built bullet solution, but it always had quirky issues if you'd click while the slider was animating and all-in-all it wasn't a very nice experience.

Recently I gave up on the custom bullets and went the route of re-styling the existing bullet markup and it went much better and I was able to recreate the effect I'd had previously (similar to the small preview boxes under the slider you see in the Steam store). It's still a little quirky, but definitely behaves better than it did before.

The awssld__bullets class (and his descendants) are what you're looking for if you want to go the restyle route.

h1sashin commented 3 years ago

Nah, I will try that, but styling built in bullets is not a solution I'm looking for. It's propably unstylable until they're children of AwesomeSlider component, and these bullets should do more than just changing current slide. Simple example below. Web 1920 – 1