custom carousel in LWC

2.2k views Asked by At

How do i create an LWC carausel design where the text and image are shown side by side instead of the default top and bottom.enter image description here

what i want is to make 1 & 2 side by side not top and bottom. link from where i took the default one: https://developer.salesforce.com/docs/component-library/bundle/lightning-carousel/example

2

There are 2 answers

0
Sebastiano Schwarz On

Due to the restrictions of the standard lightning-carousel, you would have to build your own custom component to have more flexibility and customization options here.

You can find an example of a custom LWC carousel here: Custom Slider Component

0
elmondino On

Unfortunately, that is not possible via the inbuilt LWC Carousel. There are a lot of restrictions on this component. The only elements within the carousel you can use are lightning-carousel-image, which doesn't provide much flexibility.

More information on lighting-carousel-image can be found here: https://developer.salesforce.com/docs/component-library/bundle/lightning-carousel-image/documentation