github davidjerleke/embla-carousel v8.0.0-rc02

latest releases: v8.6.0, v8.5.2, v8.5.1...
pre-release2 years ago

🚨 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

Don't miss a new embla-carousel release

NewReleases is sending notifications on new releases.