kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.33k stars 5.88k forks source link

Feature Request - Space Between Option #4263

Open emon4u opened 1 year ago

emon4u commented 1 year ago

Is there any option to add space between sliders or will you add one?

Such as SweeperS, and OwlCarousel. Now we added space with a custom margin but the option to add space from the script would be nice.

bracket-web commented 9 months ago

Truly needed option for this slider it's very useful

mosharofkhandokar commented 9 months ago

It's very useful when we are working on responsive can you guys please add this options?

layerdrops commented 9 months ago

When most sliders give a gutter option in between sliders why are you guys not giving that? very useful feature you should add With this feature it will be a full packed slider.

samratislamtushar commented 9 months ago

Please add a option for gutter option in between sliders that's very useful feature.

pulaknondi commented 9 months ago

The feature is most important please add this feature.

rr-it commented 5 months ago

As it is 2024 the browsers have evolved and here is a working solution for modern browsers!

Use clip-path: :tada:

/* gutter width: 20px */

.slick-slider {
  margin-left: -10px;
  margin-right: -10px;
}
.slick-list {
  clip-path: inset(0 10px 0 10px);
  /* warning: do not set `margin` or `padding` to anything other than `0` here! */
  margin: 0;
  padding: 0;
}
.slick-slide {
  margin-left: 10px;
  margin-right: 10px;
  background-color: thistle;
}

Also see: