Embla Carousel v3.0.0 Release Notes

Release Date: 2020-06-12 // almost 4 years ago
  • ๐Ÿฑ Embla Carousel - The next major version is here ๐ŸŽ‰ .

    โฌ†๏ธ Embla Carousel v.3 is here, and here's all you need to know before upgrading.

    ๐Ÿฑ ๐ŸŒŸ New Features

    ๐Ÿ†• New and changed options:

    • ๐Ÿ‘ #50 - Y-axis support has been implemented { axis: 'x' | 'y' }.
    • #61 - Automatically falls back to loop: false when content isn't enough for the loop effect to work.
    • #19 - ContainScroll additions has been implemented as described here { containScroll: '' |ย 'trimSnaps' |ย 'keepSnaps' }.
    • Opt-out from selectedClass toggling by passing an empty string { selectedClass: '' }.
    • Opt-out from draggableClass by passing an empty string { draggableClass: '' }.
    • Opt-out from draggingClass toggling by passing an empty string { draggingClass: '' }.
    • Choose in view threshold for slides in view { inViewThreshold: 0.5 }. Pass a number between 0 and 1 representing percentage of each slide size that needs to be visible in the carousel viewport in order to be considered in view. Ex: 0.5 = 50% of a slide needs to be in view.

    ๐Ÿ†• New API methods:

    • slidesInView() - Get a list of slide indexes within the carousel viewport.
    • slidesNotInView() - Get a list of slide indexes not within the carousel viewport.

    ๐Ÿฑ ๐Ÿ’” Breaking Changes

    ๐Ÿ“‡ Renamed events:

    • dragStart has been renamed to pointerDown.
    • dragEnd has been renamed to pointerUp.

    ๐Ÿ—„ Deprecated API methods:

    • ๐Ÿšš scrollBy() has been removed.
    • ๐Ÿšš scrollToProgress() has been removed.

    ๐Ÿ—„ Deprecated API method parameters:

    • ๐Ÿšš target : boolean for the API method scrollProgress() has been removed.

    ๐Ÿ”„ Changed options:

    • containScroll is now a string. An empty string equals the previous behavior when it was false. The previous true value is now named 'trimSnaps'.

    ๐Ÿ”„ Changed API methods:

    • changeOptions() has been renamed to reInit().
    • ๐Ÿšš scrollSnapList() now returns an array of numbers representing the scroll progress for each snap point. Indexes and slide nodes per snap point has been removed.

    ๐Ÿ› ๏ธ Bugfixes