🚨 Note!
- This release only affects
embla-carousel-svelteusers. - In addition to all changes in v8.0.0-rc01, this release includes the following:
🛠️ Bugfixes:
- #464 - Wrong
embla-carousel-svelteinit 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
- Bugfix #464 by @davidjerleke in #465
Full Changelog: v8.0.0-rc01...v8.0.0-rc02