96 |
97 | imagesInfoArray |
98 | array |
99 | undefined |
100 |
101 |
102 | (**Required**) An array of objects containing the following properties:
103 |
104 | - `id`: (**Required** - string or number) Each image's [unique identifying key](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key).
105 | - `alt`: (**Required** - string) The image's [alternative text](https://webaim.org/techniques/alttext).
106 | - `caption`: (**Optional** - string) The [image's description](https://www.studysmarter.co.uk/explanations/english/blog/image-caption).
107 | - `src`: (**Required** - string) The image's default [URL](https://codesweetly.com/web-address-url).
108 | - `gridSrc`: (**Optional** - string) The preferred grid image's URL.
109 | - `thumbSrc`: (**Optional** - string) The preferred thumbnail image's URL.
110 | - `srcSet`: (**Optional** - string) The set of images' URLs and sizes for [resolution switching](https://developer.mozilla.org/en-US/docs/Web/HTML/Responsive_images#resolution_switching_different_sizes).
111 | - [`mediaSizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Responsive_images#resolution_switching_different_sizes): (**Optional** - string) The media conditions and image sizes that hint the browser on the specific `srcSet` to display when a media condition is true.
112 |
113 | |
114 |
115 |
116 |
117 |
118 | [`columnCount`](https://codesweetly.com/css-multi-column-layout-explained#what-is-a-css-column-count-property)
119 |
120 | |
121 | number or keyword (string) |
122 | "auto" |
123 | (Optional) The number of columns. |
124 |
125 |
126 |
127 |
128 | [`columnWidth`](https://codesweetly.com/css-multi-column-layout-explained#what-is-a-css-column-width-property)
129 |
130 | |
131 | number or keyword (string) |
132 | 230 |
133 | (Optional) The minimum width of the gallery's columns. |
134 |
135 |
136 |
137 |
138 | [`gapSize`](https://codesweetly.com/css-gap-property)
139 |
140 | |
141 | number |
142 | 24 |
143 | (Optional) The gallery's gap size. |
144 |
145 |
146 | fixedCaption |
147 | boolean |
148 | false |
149 |
150 |
151 | (**Optional**) Specify whether to display the image captions permanently (`true`) or to hide them by default and ease them in on mouse hover (`false`).
152 |
153 | |
154 |
155 |
156 | thumbnailBorder |
157 | string |
158 | "3px solid #fff" |
159 | (Optional) The thumbnail's border style. |
160 |
161 |
162 | lazy |
163 | boolean |
164 | true |
165 | (Optional) Specify whether to lazy load images. |
166 |
167 |
168 | lazyFromIndex |
169 | number |
170 | 6 |
171 |
172 |
173 | (**Optional**) The image's [index](https://codesweetly.com/web-tech-terms-i/#index) to begin the grid's lazy loading.
174 |
175 | **tip:** Use a negative number to lazy load all the images.
176 |
177 | |
178 |
179 |
180 | customStyles |
181 | ImageGalleryStylesType |
182 | {} |
183 |
184 |
185 | (**Optional**) Custom styles to override the following element's default styles:
186 |
187 | - Gallery container: `galleryContainerStyle`
188 | - Gallery image button: `imageBtnStyle`
189 | - Gallery image container: `imageContainerStyle`
190 | - Gallery image element: `imageStyle`
191 | - Gallery image caption: `imageCaptionStyle`
192 | - Modal container: `modalContainerStyle`
193 | - Modal slide number: `modalSlideNumberStyle`
194 | - Modal toolbar: `modalToolbarStyle`
195 | - Modal toolbar button: `modalToolbarBtnStyle`
196 | - Modal slideshow section: `modalSlideShowSectionStyle`
197 | - Modal thumbnail section: `modalThumbnailSectionStyle`
198 | - Modal thumbnail images container: `modalThumbImgsPodStyle`
199 | - Modal image element: `modalImageStyle`
200 | - Modal slide button: `modalSlideBtnStyle`
201 |
202 | |
203 |
204 |
205 |
206 |