Sleep

Vue- ssr-carousel - Performant Carousel Element

.An efficiency concentrated Vue slide carousel designed for SSR/SSG settings. No JS is utilized to format the carousel or it's slides. The objective is to enhance LCP and CLS ratings since there is actually no layout or markup modifications when JS hydates. It's largely developed for rendering "memory card" type slides (like for linking to write-ups or even products) where the carousel-ness is actually conditionally used based upon the lot of cards that are actually slotted in as well as the viewport size.Check out the demo: https://vue-ssr-carousel.netlify.app.Put in.anecdote include vue-ssr-carousel.Default.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 demo: https://vue-ssr-carousel.netlify.app.Tips.If your slides are actually produced with v-for, utilize key market values that are actually based on the data you are knotting with. In other words, carry out v-for=" slide in slides": secret=' slide.id' rather that v-for=" slide, index in slides": key=' mark'.Don't make use of v-if on the origin factor of slide parts.API.Props.Slots.Slots.Description.default.Where your slides receive administered.back-arrow.Substitute the default back symbol. Slot props:.handicapped - Correct if initially webpage when certainly not knotting.next-arrow.Switch out the nonpayment next symbol. Slot props:.handicapped - True if finally webpage when not looping.dot.Replace the nonpayment pagination dots. Slot props:.mark - The web page index that the dot works with.impaired - Correct if dot works with present webpage.Strategies.Methods.Description.following().Move forward a page or even slide, relying on the paginate-by-slide prop.back().Go back a web page or slide, relying on the paginate-by-slide prop.goto( index).Go to a mark. If paginate-by-slide is actually false, this translates to a page balanced out. If correct, this equates to a slide made up for.Events.Observe https://vue-ssr-carousel.netlify.app/events.Events.Summary.adjustment( mark ).Fired when the inner index counter changes.input.Same as adjustment yet intended for usage along with v-model.press.Shot on computer mouse or even contact down.launch.Fired on mouse or even patch up.nuisance: start.Fired on begin of tugging.pain: end.Shot on end of dragging.tween: start( index ).Fired when the slide carousel starts tweening to it's final setting.tween: end( mark ).Discharged when the carousel has actually completed tweening to it's place.