eCommerce gallery
Bootstrap 5 eCommerce Gallery plugin
Responsive eCommerce gallery built with the latest Bootstrap 5. Customize with zoom effect, carousels, different positions, and much more.Note: Read the API tab to find all available options and advanced customization
Basic example
A basic example of a gallery with the most common use case with activation on hover.
To ensure the proper performance of the page, it is recommended to include both thumbnails and full size photos.
Activate on mouseenter
Activation on mouseenter can be enabled by passing activation='mouseenter'
as prop.
Zoom effect
Set enlarging the main image on hover with zoomEffect
.
Carousel example
Thumbnails can also be displayed as a multi carousel.
It is required to import css
styles in the index.js
file,
just before App.js
import, for the following examples to work.
for the following examples to work.
Vertical carousel
By passing thumbnailsPosition='left'
as prop you can achieve the following
effect:
Different positions
Thumbnails at the top
Pass thumbnailsPosition='top'
to render thumbnails above main image.
Thumnails on the right
Pass thumbnailsPosition='right'
to display thumbnails on the right.
Different thumbnails number
2 thumbnails
Pass thumbnailsNumber={2}
to make two thumbnails visible.
4 thumbnails
Pass thumbnailsNumber={4}
to make four thumbnails visible.
Different image sizes
Horizontal carousel
Image sizes are automatically adjusted to the view.
Vertical carousel
In a vertical carousel, it works too.
Equal image sizes
A basic example of a gallery with images of equal sizes where
autoHeight
prop is true
.
eCommerce gallery - API
Import
Properties
MDBEcommerceGallery
Name | Type | Default | Description | Example |
---|---|---|---|---|
activation
|
string | 'click' |
Defines image toogle mouse event. |
<MDBEcommerceGallery activation='mouseenter' />
|
activeThumbnail
|
number | 0 |
Defines default active element. |
<MDBEcommerceGallery activeThumbnail={2} />
|
autoHeight
|
boolean | false |
Set true to change active image styling to auto height. |
<MDBEcommerceGallery autoHeight />
|
carousel
|
boolean | false |
Set true to enable multi item carousel. |
<MDBEcommerceGallery carousel />
|
imagesSrc
|
{ thumbnail: string; src: string; alt: string }[] | - |
Defines an array of objects, a single object contains a full sized photo, thumbnail, and photo description. |
<MDBEcommerceGallery imageSrc={examplePhotos} />
|
thumbnailsNumber
|
number | 3 |
Defines the number of visible thumbnails in multi item carousel. |
<MDBEcommerceGallery thumbnailsNumber={2} />
|
thumbnailsPosition
|
'top' | 'bottom' | 'left' | 'right' | 'bottom' |
Specifies the position of the thumbnails in relation to the main photo. |
<MDBEcommerceGallery thumbnailsPosition='left' />
|
zoomEffect
|
boolean | false |
Set true to enlarge the main photo when hover. |
<MDBEcommerceGallery zoomEffect />
|