function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SF_32SF_32 

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.
<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;
}

 
Best Answer chosen by SF_32
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

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

Khan AnasKhan Anas (Salesforce Developers) 
Hi,

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
This was selected as the best answer
Khan AnasKhan Anas (Salesforce Developers) 
Not that I'm aware of, I'm afraid. Maybe you can search for apps on AppExchange.
lkatneylkatney
I am finally able to build a custom carousel as per @Khan Anas comment which removes this limitation of max images. It can show as many images as possible plus I was able to add one more essential feature into it i.e. to support videos as well. Below is the link

https://www.playg.app/play/custom-carousel-with-lwc

Thanks
Lakhan ThakurLakhan Thakur
Where is the solution? It's not working.