github davidjerleke/embla-carousel v4.3.0
v4.3.0 - Breakpoint options

latest releases: v8.6.0, v8.5.2, v8.5.1...
4 years ago

🌟 New Features

Solves issue #156. With this release, it's possible to declare different options for different breakpoints. It's achieved by using the content attribute of the pseudo element :before on the root node:

.embla:before {
  display: none;
  content: '{
    "slidesToScroll": 1,
    "draggable": true
  }';
}
@media (min-width: 768px) {
  .embla:before {
    content: '{
      "slidesToScroll": 2,
      "draggable": false
    }';
  }
}

Enjoy!

Don't miss a new embla-carousel release

NewReleases is sending notifications on new releases.