Multi item carousel
React Bootstrap 5 Multi item carousel plugin
An advanced slideshow component for cycling through images with a selectable number of active items.
Responsive Multi item carousel built with Bootstrap 5, React 18 and Material Design 2.0. Many practical examples like lightbox integration, Vertical, autoplay, and many more.Note: Read the API tab to find all available options and advanced customization
Basic example
A basic example of a multi carousel with the most common use case with 3 active items (default version).
Vertical example
To enable vertical mode just add vertical
property to the wrapper element.
Lightbox integration
Wrap carousel by a MDBLightbox
component and add lightbox
property to the wrapper to enable lightbox.
Active items
Set a items
property to change the number of active images.
Breakpoint
To change breakpoint on small devices easily set
breakpoint
property value (default value is 992). Set to false
to
disable responsiveness.
Autoplay
Set a interval
property to enable autoplay.
Multi Item Carousel - API
Import
Properties
MDBMultiCarousel
Name | Type | Default | Description | Example |
---|---|---|---|---|
breakpoint
|
number | string | boolean | 992 |
Defines window breakpoint in px to show only one item. Set to false to disable. |
<MDBMultiCarousel breakpoint={1200} />
|
interval
|
number | string | boolean | false |
Defines autoplay interval. Disabled as a default. |
<MDBMultiCarousel interval={2000} />
|
items
|
number | string | 3 |
Defines number of visible items. |
<MDBMultiCarousel items={4} />
|
lightbox
|
boolean | false |
Enables lightbox handling |
<MDBMultiCarousel lightbox />
|
multiCarouselRef
|
React.MutableRefObject<any> |
|
A reference for the MDBMultiCarousel component |
<MDBMultiCarousel multiCarouselRef={someRef} />
|
vertical
|
boolean | false |
Positions carousel vertically |
<MDBMultiCarousel vertical />
|
MDBMultiCarouselItem
Name | Type | Default | Description | Example |
---|---|---|---|---|
alt
|
string | '' |
Defines alt attribute of img element. |
<MDBMultiCarouselItem alt='Image 1' />
|
caption
|
string | '' |
Defines a caption for the item |
<MDBMultiCarouselItem caption='Test caption' />
|
disabled
|
boolean | false |
Creates a disabled image in the lightbox |
<MDBMultiCarouselItem disabled />
|
fullscreenSrc
|
string | '' |
Defines a fullscreen source for the item |
<MDBMultiCarouselItem fullscreenSrc='...' />
|
imageClassName
|
string | '' |
Adds an additional classes to images |
<MDBMultiCarouselItem imageClassName='Test' />
|
multiCarouselItemRef
|
React.Ref<any> | '' |
A reference to the multi carousel item |
<MDBMultiCarouselItem multiCarouselItemRef={someRef} />
|
src
|
string | '' |
Defines a thumbnail source for the item |
<MDBMultiCarouselItem src='...' />
|