Block "Slider"
I often try to find a way to make a slider with Gutenberg, slider that could be on home page but also could be image slider in page.
Slide could have only images (like gallery or could be made from cover with possibility to include columns, heading, text, button, colum included
Options
- choose number of slides
- design of pagination from one slide to an other (bullet, dash, color etc…)
- navigation arrow (dislpay or not, color)
- automatic or manual slide, => if automatic speed
- Full width, large width or custom width
Is there any chamce to consider to have a block "Slider" ?
Sliders are challenging to build because there are a lot of choices. The choice of which slider script to use for example. There is a plugin available called Gutenslider. My company also recently built one for private use. Displaying the slides in the editor is bit of a challenge. Gutenslider does a decent job of this, providing a block control to navigate between slides.
The slider included in WooCommerce is one I'd consider for this, I forget the name of it... might be SwiperJS? We made our version of a block slider with Splide which is a nice light-weight project, but unfortunately doesn't seem to be maintained anymore. Obviously for a core block it would be important that the slider script be stable and well supported.
I recently, after many years had a need for a slider, one was for testimonials and another for providing instructions. I went did some research, and plugin wise, makeiteasy slider is one of the best and most polished sliders, it's usable for regular users and is extra powerful for DEVs, allows you to use JSON in the editor and paste in form the popular swiper library. https://wordpress.org/plugins/makeiteasy-slider/
If you are looking to build on your own, here are some resources, I would probably use Slick or Swiper. Or you can attempt with the block interactivity API but then you have alot more work to do.
- https://accessible360.github.io/accessible-slick/ *forked from popular slick slider
- https://www.w3.org/WAI/ARIA/apg/patterns/carousel/examples/carousel-2-tablist/
I would not recommend for core to add a slider, their is alot of challenges as mentioned above(it's one of the most interactive blocks you can add).
Hi, thanks for reporting; there is another issue https://github.com/WordPress/gutenberg/issues/43369 that has a lot more discussion on making a slider block and some work that has been to explore its feasibility.