Sleep

Vue- ssr-carousel - Performant Slide carousel Element

.An efficiency centered Vue carousel developed for SSR/SSG environments. No JS is used to layout the carousel or it is actually slides. The objective is to strengthen LCP and CLS ratings considering that there is actually no style or even markup modifications when JS hydates. It's primarily made for providing "memory card" style slides (like for linking to posts or items) where the carousel-ness is actually conditionally used based upon the number of memory cards that are actually slotted in in addition to the viewport width.Check out the demo: https://vue-ssr-carousel.netlify.app.Set up.anecdote incorporate vue-ssr-carousel.Nonpayment.import 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']Consumption.Slide 1.Slide 2.Slide 3.For even more instances, find the demonstration: https://vue-ssr-carousel.netlify.app.Tips.If your slides are actually produced with v-for, make use of vital worths that are based upon the information you are actually looping via. To put it simply, carry out v-for=" slide in slides": secret=' slide.id' rather that v-for=" slide, index in slides": key=' mark'.Do not use v-if on the root component of slide components.API.Props.Ports.Slots.Description.nonpayment.Where your slides receive administered.back-arrow.Substitute the default back image. Slot props:.handicapped - Real if in the beginning page when certainly not looping.next-arrow.Substitute the nonpayment next icon. Slot props:.disabled - Real if finally page when certainly not looping.dot.Replace the default pagination dots. Port props:.index - The web page index that the dot exemplifies.impaired - Real if dot represents current web page.Approaches.Approaches.Summary.following().Go forward a page or even slide, relying on the paginate-by-slide prop.back().Go back a webpage or even slide, depending on the paginate-by-slide uphold.goto( index).Visit an index. If paginate-by-slide is actually false, this corresponds to a page offset. If real, this equates to a slide balanced out.Celebrations.Observe https://vue-ssr-carousel.netlify.app/events.Activities.Explanation.improvement( index ).Fired when the internal mark counter modifications.input.Same as adjustment but intended for usage along with v-model.press.Shot on computer mouse or even contact down.launch.Fired on computer mouse or even retouch.burden: beginning.Shot on start of dragging.burden: end.Fired on end of moving.tween: beginning( index ).Discharged when the slide carousel starts tweening to it is actually last position.tween: edge( index ).Shot when the slide carousel has actually finished tweening to it's destination.