You need to sign in to do that
Don't have an account?

Does lightning carousel has any limitation for accepting more than 5 images inside carousel
Hi All,
I am facing some issues with a lightning carousel that I am building in lwc like it is showing only 5 to 6 images inside the carousel and remaining are not showing up. If there is any limitation for the number of images could you please suggest the best approach to build a carousel for 1000's of images inside the carousel.
Here I am loading the images from the parent component.
I am facing some issues with a lightning carousel that I am building in lwc like it is showing only 5 to 6 images inside the carousel and remaining are not showing up. If there is any limitation for the number of images could you please suggest the best approach to build a carousel for 1000's of images inside the carousel.
Here I am loading the images from the parent component.
<template> <div class="slds-m-around_medium"> <div class="container"> <lightning-carousel> <template for:each={value} for:item="rows"> <lightning-carousel-image width="100%" height="50%" key={imageURL} src = {rows.imageURL} header={rows.imageName} description={rows.imageDescription}> </lightning-carousel-image> </template> </lightning-carousel> </div> </div> <!-- </lightning-card> --> </template>
import { LightningElement, api } from "lwc"; export default class fcxmCarousel extends LightningElement { @api selectdImage; @api value; }
Greetings to you!
Currently, you can use max 6 images in the carousel.
According to doc: https://developer.salesforce.com/docs/component-library/bundle/lightning-carousel/documentation
Use lightning-carousel-image components nested in lightning-carousel to specify up to five images.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Currently, you can use max 6 images in the carousel.
According to doc: https://developer.salesforce.com/docs/component-library/bundle/lightning-carousel/documentation
Use lightning-carousel-image components nested in lightning-carousel to specify up to five images.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
https://www.playg.app/play/custom-carousel-with-lwc
Thanks