Sleep

Vue- ssr-carousel - Performant Carousel Component

.An efficiency focused Vue carousel made for SSR/SSG environments. No JS is used to format the carousel or it's slides. The target is to strengthen LCP and CLS scores considering that there is actually no style or even markup changes when JS hydates. It's mainly created for rendering "card" type slides (like for linking to write-ups or even items) where the carousel-ness is actually conditionally administered based on the lot of cards that are actually slotted in along with the viewport size.Look at the demonstration: https://vue-ssr-carousel.netlify.app.Put up.anecdote incorporate vue-ssr-carousel.Nonpayment.bring in SsrCarousel from 'vue-ssr-carousel'.bring in ssrCarouselCss from 'vue-ssr-carousel/index. css'.Vue.component 'ssr-carousel', SsrCarousel.Nuxt.// nuxt.config.js.export default buildModules: [' vue-ssr-carousel/nuxt']Consumption.Slide 1.Slide 2.Slide 3.For more instances, find the trial: https://vue-ssr-carousel.netlify.app.Tips.If your slides are created along with v-for, make use of vital market values that are based on the data you are actually looping with. Simply put, perform v-for=" slide in slides": secret=' slide.id' rather that v-for=" slide, index in slides": trick=' index'.Do not use v-if on the origin component of slide components.API.Props.Ports.Ports.Explanation.default.Where your slides obtain administered.back-arrow.Change the nonpayment back icon. Slot props:.disabled - Accurate if initially webpage when certainly not looping.next-arrow.Change the nonpayment following image. Port props:.handicapped - Real if at last web page when certainly not looping.dot.Replace the default pagination dots. Port props:.index - The webpage mark that the dot stands for.handicapped - True if dot exemplifies existing web page.Strategies.Techniques.Explanation.next().Move forward a web page or slide, depending on the paginate-by-slide prop.back().Get back a web page or slide, depending on the paginate-by-slide prop.goto( mark).Most likely to an index. If paginate-by-slide is actually incorrect, this corresponds to a web page offset. If accurate, this equates to a slide offset.Celebrations.Find https://vue-ssr-carousel.netlify.app/events.Activities.Explanation.improvement( index ).Terminated when the internal mark counter modifications.input.Same as modification yet planned for make use of along with v-model.press.Fired on mouse or even touch down.launch.Fired on mouse or even touch up.drag: start.Fired on beginning of tugging.drag: end.Shot on end of moving.tween: begin( index ).Discharged when the carousel starts tweening to it is actually ultimate posture.tween: edge( index ).Shot when the slide carousel has actually finished tweening to it's destination.