Skip to content

v8.0.0-rc02

Pre-release
Pre-release
Compare
Choose a tag to compare
@davidjerleke davidjerleke released this 28 Apr 11:05
· 419 commits to master since this release

🚨 Note!

  • This release only affects embla-carousel-svelte users.
  • In addition to all changes in v8.0.0-rc01, this release includes the following:

πŸ› οΈ Bugfixes:

  • #464 - Wrong embla-carousel-svelte init event types.

❌ Don't do this anymore:

<script lang="ts">
  import emblaCarouselSvelte, type { EmblaCarouselType } from 'embla-carousel-svelte'

  let emblaApi: EmblaCarouselType

  function onInit(event: CustomEvent<EmblaCarouselType>): void {
    emblaApi = event.detail
    console.log(emblaApi.slideNodes()) // Access API
  }
</script>

<div class="embla" use:emblaCarouselSvelte init="{onInit}"> ❌
  ...
</div>

βœ… The new way to do it:

<script lang="ts">
  import emblaCarouselSvelte, type { EmblaCarouselType } from 'embla-carousel-svelte'

  let emblaApi: EmblaCarouselType

  function onInit(event: CustomEvent<EmblaCarouselType>): void {
    emblaApi = event.detail
    console.log(emblaApi.slideNodes()) // Access API
  }
</script>

<div class="embla" use:emblaCarouselSvelte emblaInit="{onInit}"> βœ…
  ...
</div>

Donations

Embla Carousel is an open source MIT licensed project. If you are interested in supporting this project, please consider:


What's Changed

Full Changelog: v8.0.0-rc01...v8.0.0-rc02