Sleep

Vue- ssr-carousel - Performant Slide carousel Element

.A functionality centered Vue slide carousel designed for SSR/SSG settings. No JS is utilized to design the carousel or even it's slides. The goal is to boost LCP and CLS scores because there is no design or even profit improvements when JS hydates. It's primarily created for leaving "memory card" type slides (like for linking to posts or products) where the carousel-ness is actually conditionally administered based upon the amount of memory cards that are actually slotted in and also the viewport width.Look at the demonstration: https://vue-ssr-carousel.netlify.app.Install.yarn add vue-ssr-carousel.Default.import SsrCarousel coming from 'vue-ssr-carousel'.bring in ssrCarouselCss coming from 'vue-ssr-carousel/index. css'.Vue.component 'ssr-carousel', SsrCarousel.Nuxt.// nuxt.config.js.export nonpayment buildModules: [' vue-ssr-carousel/nuxt']Utilization.Slide 1.Slide 2.Slide 3.For even more examples, observe the demonstration: https://vue-ssr-carousel.netlify.app.Tips.If your slides are actually generated along with v-for, use essential market values that are based on the data you are actually knotting by means of. In other words, do v-for=" slide in slides": key=' slide.id' rather that v-for=" slide, mark in slides": trick=' index'.Do not utilize v-if on the origin element of slide elements.API.Props.Ports.Slots.Explanation.nonpayment.Where your slides receive infused.back-arrow.Change the default back image. Port props:.disabled - True if at first webpage when not looping.next-arrow.Change the nonpayment upcoming icon. Port props:.impaired - True if finally page when certainly not knotting.dot.Replace the default pagination dots. Port props:.mark - The webpage mark that the dot embodies.handicapped - True if dot exemplifies current page.Approaches.Techniques.Summary.upcoming().Go ahead a webpage or even slide, relying on the paginate-by-slide uphold.back().Return a web page or even slide, depending upon the paginate-by-slide set.goto( mark).Most likely to a mark. If paginate-by-slide is actually false, this relates to a webpage balanced out. If accurate, this relates to a slide made up for.Celebrations.See https://vue-ssr-carousel.netlify.app/events.Occasions.Explanation.change( mark ).Fired when the inner index counter improvements.input.Like improvement yet wanted for usage with v-model.push.Shot on mouse or touch down.launch.Shot on computer mouse or repair.drag: begin.Fired on beginning of yanking.drag: end.Shot on end of yanking.tween: beginning( index ).Fired when the slide carousel starts tweening to it's final posture.tween: edge( index ).Shot when the carousel has actually completed tweening to it's destination.