Sleep

Vue- ssr-carousel - Performant Slide carousel Element

.A performance centered Vue carousel designed for SSR/SSG settings. No JS is actually made use of to style the carousel or even it's slides. The objective is to boost LCP and CLS credit ratings considering that there is no style or even profit improvements when JS hydates. It's largely designed for rendering "memory card" type slides (like for linking to articles or even items) where the carousel-ness is actually conditionally applied based on the lot of cards that are slotted in along with the viewport distance.Take a look at the trial: https://vue-ssr-carousel.netlify.app.Put up.yarn include vue-ssr-carousel.Default.bring in SsrCarousel coming from 'vue-ssr-carousel'.import ssrCarouselCss coming from 'vue-ssr-carousel/index. css'.Vue.component 'ssr-carousel', SsrCarousel.Nuxt.// nuxt.config.js.export nonpayment buildModules: [' vue-ssr-carousel/nuxt']Use.Slide 1.Slide 2.Slide 3.For even more examples, find the demonstration: https://vue-ssr-carousel.netlify.app.Tips.If your slides are created along with v-for, make use of vital values that are actually based upon the data you are looping through. Simply put, perform v-for=" slide in slides": key=' slide.id' rather that v-for=" slide, mark in slides": key=' mark'.Do not make use of v-if on the root component of slide components.API.Props.Ports.Slots.Summary.nonpayment.Where your slides get administered.back-arrow.Substitute the default back icon. Port props:.handicapped - Real if in the beginning webpage when not looping.next-arrow.Substitute the default upcoming symbol. Slot props:.handicapped - Accurate if at last web page when certainly not looping.dot.Change the default pagination dots. Port props:.index - The page mark that the dot embodies.impaired - Correct if dot works with present page.Methods.Techniques.Description.upcoming().Go forward a web page or even slide, depending on the paginate-by-slide set.back().Return a page or slide, relying on the paginate-by-slide uphold.goto( mark).Head to an index. If paginate-by-slide is false, this equates to a web page balanced out. If true, this translates to a slide made up for.Occasions.See https://vue-ssr-carousel.netlify.app/events.Events.Summary.improvement( index ).Axed when the internal index counter adjustments.input.Like adjustment however meant for use along with v-model.press.Fired on computer mouse or even touch down.release.Shot on computer mouse or even retouch.pain: start.Fired on begin of tugging.bother: end.Fired on end of tugging.tween: begin( mark ).Fired when the carousel starts tweening to it is actually final posture.tween: edge( index ).Axed when the slide carousel has completed tweening to it is actually destination.