j1-template 2024.3.16 → 2024.3.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/data/amplitude.html +132 -61
- data/assets/data/banner.html +1 -1
- data/assets/data/cookieconsent.html +1 -1
- data/assets/data/docsearch.html +1 -1
- data/assets/data/fab.html +1 -1
- data/assets/data/footer.html +1 -1
- data/assets/data/galeries.html +1 -1
- data/assets/data/gallery_customizer.html +1 -1
- data/assets/data/gemini-ui.html +1 -1
- data/assets/data/iframes.html +1 -1
- data/assets/data/masonry.html +1 -1
- data/assets/data/masterslider.html +1 -1
- data/assets/data/menu.html +1 -1
- data/assets/data/mmenu.html +1 -1
- data/assets/data/mmenu_sidebar.html +1 -1
- data/assets/data/mmenu_toc.html +1 -1
- data/assets/data/panel.html +1 -1
- data/assets/data/quicklinks.html +1 -1
- data/assets/data/rtext_resizer.html +1 -1
- data/assets/data/slick.html +1 -1
- data/assets/data/speak2me.html +1 -1
- data/assets/data/swiper.html +313 -0
- data/assets/theme/j1/adapter/js/amplitude.30.js +1177 -0
- data/assets/theme/j1/adapter/js/amplitude.js +152 -121
- data/assets/theme/j1/adapter/js/j1.js +3 -3
- data/assets/theme/j1/adapter/js/masterslider.js +2 -1
- data/assets/theme/j1/adapter/js/swiper.js +231 -0
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +13 -3
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +53 -6
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +2 -1
- data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.15.js +1594 -0
- data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +1617 -89
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/bar.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/circular-equalizer.js +31 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/frequency-analyzer.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/michael-bromley.js +1 -1
- data/assets/theme/j1/modules/amplitudejs/js/visualizations/template.js +1 -1
- data/assets/theme/j1/modules/photoswipe/.version_5.4.4 +6 -0
- data/assets/theme/j1/modules/photoswipe/LICENSE +21 -0
- data/assets/theme/j1/modules/photoswipe/README.md +32 -0
- data/assets/theme/j1/modules/photoswipe/css/org/photoswipe-dynamic-caption-plugin.umd.min.js +5 -0
- data/assets/theme/j1/modules/photoswipe/css/org/photoswipe.css +420 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.css +67 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.min.css +16 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe.css +376 -0
- data/assets/theme/j1/modules/photoswipe/css/photoswipe.min.css +17 -0
- data/assets/theme/j1/modules/photoswipe/css/scss/photoswipe.scss +427 -0
- data/assets/theme/j1/modules/photoswipe/example/photoswipe-caption-plugin.html +237 -0
- data/assets/theme/j1/modules/photoswipe/example/test-gallery.html +36 -0
- data/assets/theme/j1/modules/photoswipe/js/README.md +43 -0
- data/assets/theme/j1/modules/photoswipe/js/photoswipe-caption-plugin.min.js +5 -0
- data/assets/theme/j1/modules/photoswipe/js/photoswipe-core.min.js +18 -0
- data/assets/theme/j1/modules/photoswipe/js/photoswipe-lightbox.min.js +18 -0
- data/assets/theme/j1/modules/swiper/.version_1.2.0 +15 -0
- data/assets/theme/j1/modules/swiper/LICENSE +20 -0
- data/assets/theme/j1/modules/swiper/README.md +95 -0
- data/assets/theme/j1/modules/swiper/css/swiper-bundle.css +740 -0
- data/assets/theme/j1/modules/swiper/css/swiper-bundle.min..css +17 -0
- data/assets/theme/j1/modules/swiper/css/theme/uno.css +249 -0
- data/assets/theme/j1/modules/swiper/css/theme/uno.min.css +154 -0
- data/assets/theme/j1/modules/swiper/js/swiper-bundle.js +9785 -0
- data/assets/theme/j1/modules/swiper/js/swiper-bundle.min.js +17 -0
- data/assets/theme/j1/modules/swiper/swiperjs.com-demos.url +2 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/amplitude.yml +374 -39
- data/lib/starter_web/_data/modules/defaults/amplitude.yml +60 -35
- data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/swiper.yml +515 -0
- data/lib/starter_web/_data/modules/swiper.yml +227 -0
- data/lib/starter_web/_data/resources.yml +53 -1
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_plugins/asciidoctor/amplitude-block.rb +1 -0
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +0 -4
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/der_unverzichtbare_feind.jpg +0 -0
- data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/ein_diener_vieler_herren.jpg +0 -0
- data/lib/starter_web/assets/video/poster/youtube/the_piano/the-piano.jpg +0 -0
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/_includes/attributes.asciidoc +45 -0
- data/lib/starter_web/pages/public/_includes/documents/photoswipe/200_photoswipe_parameters.asciidoc +510 -0
- data/lib/starter_web/pages/public/_includes/documents/photoswipe/210_photoswipe_lightbox_parameters.asciidoc +98 -0
- data/lib/starter_web/pages/public/_includes/documents/photoswipe/300_caption_plugin_for_photoSwipe.asciidoc +327 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_features.asciidoc +50 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_html_layout.asciidoc +122 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_initialization.asciidoc +53 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/110_swiper_common_options.asciidoc +43 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_a_k.asciidoc +994 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_l_o.asciidoc +473 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_p_s.asciidoc +700 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_t_z.asciidoc +413 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/300_swiper_instance_properties.asciidoc +873 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/400_swiper_modules.asciidoc +2514 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/500_swiper_methods.asciidoc +989 -0
- data/lib/starter_web/pages/public/_includes/documents/swiper/600_swiper_events.asciidoc +1534 -0
- data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +77 -63
- data/lib/starter_web/pages/public/photoswipe_api.adoc +150 -0
- data/lib/starter_web/pages/public/swiper_api.adoc +128 -0
- data/lib/starter_web/pages/public/swiper_tester.adoc +973 -0
- data/lib/starter_web/pages/public/tour/modal_extentions.adoc +12 -5
- data/lib/starter_web/pages/public/tour/play_audio.adoc +60 -5
- data/lib/starter_web/pages/public/tour/play_video.adoc +30 -0
- data/lib/starter_web/pages/public/tour/present_images.adoc +5 -5
- metadata +56 -3
- data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +0 -211
@@ -0,0 +1,2514 @@
|
|
1
|
+
[role="mt-5"]
|
2
|
+
[[swiper-modules]]
|
3
|
+
== Modules
|
4
|
+
|
5
|
+
Find available SwiperJS module descriptions also with the
|
6
|
+
https://swiperjs.com/swiper-api#modules[Swiper Documentation, {browser-window--new}].
|
7
|
+
|
8
|
+
|
9
|
+
[role="mt-4"]
|
10
|
+
[[swiper-module-navigation]]
|
11
|
+
=== Navigation
|
12
|
+
|
13
|
+
In SwiperJS, the Navigation module provides a way to control the slider's
|
14
|
+
movement using dedicated "next" and "previous" buttons.
|
15
|
+
|
16
|
+
Customizable Buttons::
|
17
|
+
You can use your own HTML elements (like buttons or icons) as navigation
|
18
|
+
controls.
|
19
|
+
|
20
|
+
Flexibility::
|
21
|
+
The module offers options to customize the appearance and behavior of
|
22
|
+
the navigation buttons.
|
23
|
+
|
24
|
+
|
25
|
+
[role="mt-5"]
|
26
|
+
[[swiper-module-navigation-parameters]]
|
27
|
+
==== Parameters
|
28
|
+
|
29
|
+
Find below available *Parameters* for the SwiperJS *Navigation* module.
|
30
|
+
|
31
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
32
|
+
|===
|
33
|
+
|Name |Type |Default |Description \| Example
|
34
|
+
|
35
|
+
|`disabledClass`
|
36
|
+
|string
|
37
|
+
|_swiper-button-disabled_
|
38
|
+
|*CSS class name* added to navigation button when it becomes disabled.
|
39
|
+
|
40
|
+
|`enabled`
|
41
|
+
|boolean
|
42
|
+
|*no default*
|
43
|
+
|Boolean property to use with breakpoints to *enable/disable* navigation
|
44
|
+
on certain *breakpoints*
|
45
|
+
|
46
|
+
|`hiddenClass`
|
47
|
+
|string
|
48
|
+
|_swiper-button-hidden_
|
49
|
+
|*CSS class name* added to *navigation button* when it becomes *hidden*.
|
50
|
+
|
51
|
+
|hideOnClick
|
52
|
+
|boolean
|
53
|
+
|`false`
|
54
|
+
|*Toggle* navigation *button visibility* after *click* on Slider's container.
|
55
|
+
|
56
|
+
|`lockClass`
|
57
|
+
|string
|
58
|
+
|swiper-button-lock
|
59
|
+
|*CSS class name* added to *navigation button* when it is *disabled*.
|
60
|
+
|
61
|
+
|`navigationDisabledClass`
|
62
|
+
|string
|
63
|
+
|_swiper-navigation-disabled_
|
64
|
+
|*CSS class name* added *on swiper container* when navigation is *disabled*
|
65
|
+
by *breakpoint*
|
66
|
+
|
67
|
+
|`nextEl`
|
68
|
+
|any
|
69
|
+
|null
|
70
|
+
|String with *CSS selector* or *HTML element* of the element that will
|
71
|
+
work like *next button* after click on it.
|
72
|
+
|
73
|
+
|`prevEl`
|
74
|
+
|any
|
75
|
+
|null
|
76
|
+
|String with *CSS selector* or *HTML element* of the element that will
|
77
|
+
work like *prev button* after click on it.
|
78
|
+
|===
|
79
|
+
|
80
|
+
[role="mt-4"]
|
81
|
+
[[swiper-module-navigation-properties]]
|
82
|
+
==== Properties
|
83
|
+
|
84
|
+
Find below available *Properties* for the SwiperJS *Navigation* module.
|
85
|
+
|
86
|
+
[cols="3,9a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
87
|
+
|===
|
88
|
+
|Name |Description \| Example
|
89
|
+
|
90
|
+
|`nextEl`
|
91
|
+
|HTMLElement of *next* navigation button.
|
92
|
+
|
93
|
+
|`prevEl`
|
94
|
+
|HTMLElement of *previous* navigation button
|
95
|
+
|
96
|
+
|===
|
97
|
+
|
98
|
+
[role="mt-4"]
|
99
|
+
[[swiper-module-navigation-methods]]
|
100
|
+
==== Methods
|
101
|
+
|
102
|
+
Find below available *Methods* for the SwiperJS *Navigation* module.
|
103
|
+
|
104
|
+
[cols="3,9a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
105
|
+
|===
|
106
|
+
|Name |Description \| Example
|
107
|
+
|
108
|
+
|`destroy()`
|
109
|
+
|Destroy navigation.
|
110
|
+
|
111
|
+
|`init()`
|
112
|
+
|Initialize navigation.
|
113
|
+
|
114
|
+
|`update()`
|
115
|
+
|Update navigation buttons state (enabled/disabled).
|
116
|
+
|
117
|
+
|===
|
118
|
+
|
119
|
+
[role="mt-4"]
|
120
|
+
[[swiper-module-navigation-events]]
|
121
|
+
==== Events
|
122
|
+
|
123
|
+
Find below available Events for the SwiperJS *Navigation* module.
|
124
|
+
|
125
|
+
[role="mt-4"]
|
126
|
+
[[swiper-module-navigation-events-navigationHide]]
|
127
|
+
===== navigationHide
|
128
|
+
|
129
|
+
Event will be fired on *navigation hide*
|
130
|
+
|
131
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
132
|
+
|===
|
133
|
+
|Usage
|
134
|
+
|
135
|
+
|
|
136
|
+
[source, js]
|
137
|
+
----
|
138
|
+
const swiper = new Swiper('.swiper', {
|
139
|
+
// option settings ...
|
140
|
+
on: {
|
141
|
+
navigationHide: (swiper) => {
|
142
|
+
// do something
|
143
|
+
}
|
144
|
+
}
|
145
|
+
});
|
146
|
+
----
|
147
|
+
|
148
|
+
|===
|
149
|
+
|
150
|
+
[role="mt-4"]
|
151
|
+
[[swiper-module-navigation-events-navigationNext]]
|
152
|
+
===== navigationNext
|
153
|
+
|
154
|
+
Event will be fired on *click* the navigation *next button*.
|
155
|
+
|
156
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
157
|
+
|===
|
158
|
+
|Usage
|
159
|
+
|
160
|
+
|
|
161
|
+
[source, js]
|
162
|
+
----
|
163
|
+
const swiper = new Swiper('.swiper', {
|
164
|
+
// option settings ...
|
165
|
+
on: {
|
166
|
+
navigationNext: (swiper) => {
|
167
|
+
// do something
|
168
|
+
}
|
169
|
+
}
|
170
|
+
});
|
171
|
+
----
|
172
|
+
|
173
|
+
|===
|
174
|
+
|
175
|
+
[role="mt-4"]
|
176
|
+
[[swiper-module-navigation-events-navigationPrev]]
|
177
|
+
===== navigationPrev
|
178
|
+
|
179
|
+
Event will be fired on *click* the navigation *prev button*.
|
180
|
+
|
181
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
182
|
+
|===
|
183
|
+
|Usage
|
184
|
+
|
185
|
+
|
|
186
|
+
[source, js]
|
187
|
+
----
|
188
|
+
const swiper = new Swiper('.swiper', {
|
189
|
+
// option settings ...
|
190
|
+
on: {
|
191
|
+
navigationPrev: (swiper) => {
|
192
|
+
// do something
|
193
|
+
}
|
194
|
+
}
|
195
|
+
});
|
196
|
+
----
|
197
|
+
|
198
|
+
|===
|
199
|
+
|
200
|
+
[role="mt-4"]
|
201
|
+
[[swiper-module-navigation-events-navigationShow]]
|
202
|
+
===== navigationShow
|
203
|
+
|
204
|
+
Event will be fired on *navigation show*.
|
205
|
+
|
206
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
207
|
+
|===
|
208
|
+
|Usage
|
209
|
+
|
210
|
+
|
|
211
|
+
[source, js]
|
212
|
+
----
|
213
|
+
const swiper = new Swiper('.swiper', {
|
214
|
+
// option settings ...
|
215
|
+
on: {
|
216
|
+
navigationShow: (swiper) => {
|
217
|
+
// do something
|
218
|
+
}
|
219
|
+
}
|
220
|
+
});
|
221
|
+
----
|
222
|
+
|
223
|
+
|===
|
224
|
+
|
225
|
+
[role="mt-4"]
|
226
|
+
[[swiper-module-navigation-css-properties]]
|
227
|
+
==== CSS Properties
|
228
|
+
|
229
|
+
Find below available *CSS Properties* for the SwiperJS *Navigation* module.
|
230
|
+
|
231
|
+
[source,language-css]
|
232
|
+
----
|
233
|
+
{
|
234
|
+
--swiper-navigation-size: 44px;
|
235
|
+
--swiper-navigation-top-offset: 50%;
|
236
|
+
--swiper-navigation-sides-offset: 10px;
|
237
|
+
--swiper-navigation-color: var(--swiper-theme-color);
|
238
|
+
}
|
239
|
+
----
|
240
|
+
|
241
|
+
|
242
|
+
[role="mt-5"]
|
243
|
+
[[swiper-module-pagination]]
|
244
|
+
=== Pagination
|
245
|
+
|
246
|
+
The Pagination module in SwiperJS is a powerful tool that allows you to
|
247
|
+
easily add visual indicators to your slider, making it clear to users
|
248
|
+
how many slides there are and which slide they are currently viewing.
|
249
|
+
Here's a breakdown of its key functionalities:
|
250
|
+
|
251
|
+
Active State::
|
252
|
+
The indicator corresponding to the currently active slide is visually
|
253
|
+
highlighted to provide immediate feedback to the user.
|
254
|
+
|
255
|
+
User Interaction::
|
256
|
+
In many cases, the pagination indicators are clickable. Clicking on an
|
257
|
+
indicator will directly navigate the slider to the corresponding slide.
|
258
|
+
|
259
|
+
Visual Indicators::
|
260
|
+
The module generates a set of visual indicators (often small dots or numbers)
|
261
|
+
that represent each slide in your slider.
|
262
|
+
|
263
|
+
|
264
|
+
[role="mt-4"]
|
265
|
+
[[swiper-module-pagination-parameters]]
|
266
|
+
==== Parameters
|
267
|
+
|
268
|
+
Find below available *Parameters* for the SwiperJS *Pagination* module.
|
269
|
+
|
270
|
+
// [cols="4a,2,2,3a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
271
|
+
[cols=",,,", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
272
|
+
|===
|
273
|
+
|Name |Type |Default |Description \| Example
|
274
|
+
|
275
|
+
|`bulletActiveClass`
|
276
|
+
|string
|
277
|
+
|_swiper-pagination-bullet-active_
|
278
|
+
|*CSS class name* of the *active* pagination *bullet*.
|
279
|
+
|
280
|
+
|`bulletClass`
|
281
|
+
|string
|
282
|
+
|_swiper-pagination-bullet_
|
283
|
+
|*CSS class name* of the pagination *bullet*.
|
284
|
+
|
285
|
+
|`bulletElement`
|
286
|
+
|string
|
287
|
+
|_span_
|
288
|
+
|Defines which HTML tag will be used to represent single pagination bullet.
|
289
|
+
Only for pagination type of _bullets_ .
|
290
|
+
|
291
|
+
|`clickable`
|
292
|
+
|boolean
|
293
|
+
|`false`
|
294
|
+
|If `true` then clicking on pagination button will cause transition
|
295
|
+
to appropriate slide. Only for bullets pagination type.
|
296
|
+
|
297
|
+
|`clickableClass`
|
298
|
+
|string
|
299
|
+
|_swiper-pagination-clickable_
|
300
|
+
|*CSS class name* set to pagination if its *clickable*.
|
301
|
+
|
302
|
+
|`currentClass`
|
303
|
+
|string
|
304
|
+
|_swiper-pagination-current_
|
305
|
+
|*CSS class name* of the element with currently active index in
|
306
|
+
*fraction* pagination.
|
307
|
+
|
308
|
+
|`dynamicBullets`
|
309
|
+
|boolean
|
310
|
+
|`false`
|
311
|
+
|Good to enable if you use bullets pagination with a lot of slides.
|
312
|
+
So it will keep only few bullets visible at the same time.
|
313
|
+
|
314
|
+
|`dynamicMainBullets`
|
315
|
+
|number
|
316
|
+
|1
|
317
|
+
|The number of main bullets visible when `dynamicBullets` is enabled.
|
318
|
+
|
319
|
+
|`el`
|
320
|
+
|any
|
321
|
+
|null
|
322
|
+
|String with CSS selector or HTML element of the container with pagination.
|
323
|
+
|
324
|
+
|`enabled`
|
325
|
+
|boolean
|
326
|
+
|*no default*
|
327
|
+
|Boolean property to use with breakpoints to enable/disable pagination
|
328
|
+
on certain breakpoints.
|
329
|
+
|
330
|
+
|`formatFractionCurrent`
|
331
|
+
|function(number)
|
332
|
+
|*no default*
|
333
|
+
|Format fraction pagination current number. Function receives current
|
334
|
+
number, and you need to return formatted value.
|
335
|
+
|
336
|
+
|`formatFractionTotal`
|
337
|
+
|function(number)
|
338
|
+
|*no default*
|
339
|
+
|Format fraction pagination total number. Function receives total number,
|
340
|
+
and you need to return formatted value.
|
341
|
+
|
342
|
+
|`hiddenClass`
|
343
|
+
|string
|
344
|
+
|_swiper-pagination-hidden_
|
345
|
+
|*CSS class name* of pagination when it becomes inactive.
|
346
|
+
|
347
|
+
|`hideOnClick`
|
348
|
+
|boolean
|
349
|
+
|`true`
|
350
|
+
|Toggle (hide/show) pagination container visibility after click on
|
351
|
+
slider's container.
|
352
|
+
|
353
|
+
|`horizontalClass`
|
354
|
+
|string
|
355
|
+
|_swiper-pagination-horizontal_
|
356
|
+
|CSS class name set to pagination in horizontal Swiper.
|
357
|
+
|
358
|
+
|`lockClass`
|
359
|
+
|string
|
360
|
+
|_swiper-pagination-lock_
|
361
|
+
|*CSS class name* set to pagination when it is disabled.
|
362
|
+
|
363
|
+
|`modifierClass`
|
364
|
+
|string
|
365
|
+
|_swiper-pagination-_
|
366
|
+
|The *beginning* of the *modifier CSS class name* that will be added
|
367
|
+
to pagination depending on parameters.
|
368
|
+
|
369
|
+
|`paginationDisabledClass`
|
370
|
+
|string
|
371
|
+
|_swiper-pagination-disabled_
|
372
|
+
|*CSS class name* added on swiper container and pagination element
|
373
|
+
when pagination is disabled by breakpoint.
|
374
|
+
|
375
|
+
|`progressbarFillClass`
|
376
|
+
|string
|
377
|
+
|_swiper-pagination-progressbar-fill_
|
378
|
+
|*CSS class name* of pagination progressbar fill element.
|
379
|
+
|
380
|
+
|`progressbarOpposite`
|
381
|
+
|boolean
|
382
|
+
|`false`
|
383
|
+
|Makes pagination progressbar opposite to Swiper's `direction`
|
384
|
+
parameter, means vertical progressbar for horizontal swiper direction
|
385
|
+
and horizontal progressbar for vertical swiper direction
|
386
|
+
|
387
|
+
|`progressbarOppositeClass`
|
388
|
+
|string
|
389
|
+
|_swiper-pagination-progressbar-opposite_
|
390
|
+
|*CSS class name* of pagination progressbar opposite
|
391
|
+
|
392
|
+
|`renderBullet`
|
393
|
+
|function(args)
|
394
|
+
|*no default*
|
395
|
+
|This parameter allows totally customize pagination bullets, you need to
|
396
|
+
pass here a function that accepts `index` number of pagination bullet
|
397
|
+
and required element class name (`className`). Only for `'bullets'`
|
398
|
+
pagination type.
|
399
|
+
|
400
|
+
[source, js]
|
401
|
+
----
|
402
|
+
const swiper = new Swiper('.swiper', {
|
403
|
+
//...
|
404
|
+
renderBullet: function (index, className) {
|
405
|
+
return '<span class="' + className + '">' + (index + 1) + '</span>';
|
406
|
+
}
|
407
|
+
});
|
408
|
+
----
|
409
|
+
|
410
|
+
|`renderCustom`
|
411
|
+
|function(args)
|
412
|
+
|*no default*
|
413
|
+
|This parameter is required for _custom_ pagination type where you
|
414
|
+
have to specify how it should be rendered.
|
415
|
+
|
416
|
+
[source, js]
|
417
|
+
----
|
418
|
+
const swiper = new Swiper('.swiper', {
|
419
|
+
//...
|
420
|
+
renderCustom: function (swiper, current, total) {
|
421
|
+
return current + ' of ' + total;
|
422
|
+
}
|
423
|
+
});
|
424
|
+
----
|
425
|
+
|
426
|
+
|`renderFraction`
|
427
|
+
|function(args)
|
428
|
+
|*no default*
|
429
|
+
|This parameter allows to customize *fraction* pagination html. Only for
|
430
|
+
_fraction_ pagination type.
|
431
|
+
|
432
|
+
[source, js]
|
433
|
+
----
|
434
|
+
const swiper = new Swiper('.swiper', {
|
435
|
+
//...
|
436
|
+
renderFraction: function (currentClass, totalClass) {
|
437
|
+
return '<span class="' + currentClass + '"></span>' +
|
438
|
+
' of ' +
|
439
|
+
'<span class="' + totalClass + '"></span>';
|
440
|
+
}
|
441
|
+
});
|
442
|
+
----
|
443
|
+
|
444
|
+
|`renderProgressbar`
|
445
|
+
|function(args)
|
446
|
+
|*no default*
|
447
|
+
|This parameter allows to customize "progress" pagination. Only for
|
448
|
+
_progress_ pagination type
|
449
|
+
|
450
|
+
[source, js]
|
451
|
+
----
|
452
|
+
const swiper = new Swiper('.swiper', {
|
453
|
+
//...
|
454
|
+
renderProgressbar: function (progressbarFillClass) {
|
455
|
+
return '<span class="' + progressbarFillClass + '"></span>';
|
456
|
+
}
|
457
|
+
});
|
458
|
+
----
|
459
|
+
|
460
|
+
|`totalClass`
|
461
|
+
|string
|
462
|
+
|_swiper-pagination-total_
|
463
|
+
|*CSS class name* of the element with total number of *snaps* in
|
464
|
+
*fraction* pagination.
|
465
|
+
|
466
|
+
|`type`
|
467
|
+
|string
|
468
|
+
|_bullets_
|
469
|
+
|String with type of pagination. +
|
470
|
+
Can be _bullets_, _fraction_ , _progressbar_ or _custom_.
|
471
|
+
|
472
|
+
|`verticalClass`
|
473
|
+
|string
|
474
|
+
|_swiper-pagination-vertical_
|
475
|
+
|*CSS class name* set to pagination in vertical Swiper.
|
476
|
+
|
477
|
+
|===
|
478
|
+
|
479
|
+
[role="mt-4"]
|
480
|
+
[[swiper-module-pagination-properties]]
|
481
|
+
==== Properties
|
482
|
+
|
483
|
+
Find below available *Properties* for the SwiperJS *Pagination* module.
|
484
|
+
|
485
|
+
[cols="3,9a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
486
|
+
|===
|
487
|
+
|Property |Description \| Example
|
488
|
+
|
489
|
+
|`bullets`
|
490
|
+
|Array of pagination bullets HTML elements. To get specific slide
|
491
|
+
HTMLElement use `swiper.pagination.bullets[1]`.
|
492
|
+
|
493
|
+
|`el`
|
494
|
+
|HTMLElement of pagination container element.
|
495
|
+
|
496
|
+
|===
|
497
|
+
|
498
|
+
[role="mt-4"]
|
499
|
+
[[swiper-module-pagination-methods]]
|
500
|
+
==== Methods
|
501
|
+
|
502
|
+
Find below available *Methods* for the SwiperJS *Pagination* module.
|
503
|
+
|
504
|
+
[cols="3,9a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
505
|
+
|===
|
506
|
+
|Method |Description \| Example
|
507
|
+
|
508
|
+
|`destroy`
|
509
|
+
|Destroy pagination.
|
510
|
+
|
511
|
+
|`init`
|
512
|
+
|Initialize pagination.
|
513
|
+
|
514
|
+
|`render`
|
515
|
+
|Render pagination layout.
|
516
|
+
|
517
|
+
|`update`
|
518
|
+
|Update pagination state of *enabled* \| *disabled* \| *active*.
|
519
|
+
|===
|
520
|
+
|
521
|
+
[role="mt-4"]
|
522
|
+
[[swiper-module-pagination-events]]
|
523
|
+
==== Events
|
524
|
+
|
525
|
+
Find below available *Events* for the SwiperJS *Pagination* module.
|
526
|
+
|
527
|
+
[role="mt-4"]
|
528
|
+
[[swiper-module-pagination-events-paginationHide]]
|
529
|
+
===== paginationHide
|
530
|
+
|
531
|
+
Event will be fired on pagination hide.
|
532
|
+
|
533
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
534
|
+
|===
|
535
|
+
|Usage
|
536
|
+
|
537
|
+
|
|
538
|
+
[source, js]
|
539
|
+
----
|
540
|
+
const swiper = new Swiper('.swiper', {
|
541
|
+
// option settings ...
|
542
|
+
on: {
|
543
|
+
paginationHide: (swiper) => {
|
544
|
+
// do something
|
545
|
+
}
|
546
|
+
}
|
547
|
+
});
|
548
|
+
----
|
549
|
+
|
550
|
+
|===
|
551
|
+
|
552
|
+
[role="mt-4"]
|
553
|
+
[[swiper-module-pagination-events-paginationRender]]
|
554
|
+
===== paginationRender
|
555
|
+
|
556
|
+
Event will be fired after pagination rendered.
|
557
|
+
|
558
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
559
|
+
|===
|
560
|
+
|Usage
|
561
|
+
|
562
|
+
|
|
563
|
+
[source, js]
|
564
|
+
----
|
565
|
+
const swiper = new Swiper('.swiper', {
|
566
|
+
// option settings ...
|
567
|
+
on: {
|
568
|
+
paginationRender: (swiper) => {
|
569
|
+
// do something
|
570
|
+
}
|
571
|
+
}
|
572
|
+
});
|
573
|
+
----
|
574
|
+
|
575
|
+
|===
|
576
|
+
|
577
|
+
[role="mt-4"]
|
578
|
+
[[swiper-module-pagination-events-paginationShow]]
|
579
|
+
===== paginationShow
|
580
|
+
|
581
|
+
Event will be fired when pagination is *shown*.
|
582
|
+
|
583
|
+
[NOTE]
|
584
|
+
====
|
585
|
+
Receives *paginationEl* event as an *argument*.
|
586
|
+
====
|
587
|
+
|
588
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
589
|
+
|===
|
590
|
+
|Usage
|
591
|
+
|
592
|
+
|
|
593
|
+
[source, js]
|
594
|
+
----
|
595
|
+
const swiper = new Swiper('.swiper', {
|
596
|
+
// option settings ...
|
597
|
+
on: {
|
598
|
+
paginationShow: (swiper, paginationEl) => {
|
599
|
+
// do something
|
600
|
+
}
|
601
|
+
}
|
602
|
+
});
|
603
|
+
----
|
604
|
+
|
605
|
+
|===
|
606
|
+
|
607
|
+
[role="mt-4"]
|
608
|
+
[[swiper-module-pagination-events-paginationUpdate]]
|
609
|
+
===== paginationUpdate
|
610
|
+
|
611
|
+
Event will be fired when pagination updated
|
612
|
+
|
613
|
+
[NOTE]
|
614
|
+
====
|
615
|
+
Receives *paginationEl* event as an *argument*.
|
616
|
+
====
|
617
|
+
|
618
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
619
|
+
|===
|
620
|
+
|Usage
|
621
|
+
|
622
|
+
|
|
623
|
+
[source, js]
|
624
|
+
----
|
625
|
+
const swiper = new Swiper('.swiper', {
|
626
|
+
// option settings ...
|
627
|
+
on: {
|
628
|
+
paginationUpdate: (swiper, paginationEl) => {
|
629
|
+
// do something
|
630
|
+
}
|
631
|
+
}
|
632
|
+
});
|
633
|
+
----
|
634
|
+
|
635
|
+
|===
|
636
|
+
|
637
|
+
|
638
|
+
[role="mt-4"]
|
639
|
+
[[swiper-module-pagination-css-properties]]
|
640
|
+
==== CSS Properties
|
641
|
+
|
642
|
+
Find below available *CSS Properties* for the SwiperJS *Pagination* module.
|
643
|
+
|
644
|
+
[source,language-css]
|
645
|
+
----
|
646
|
+
{
|
647
|
+
--swiper-pagination-color: var(--swiper-theme-color);
|
648
|
+
--swiper-pagination-left: auto;
|
649
|
+
--swiper-pagination-right: 8px;
|
650
|
+
--swiper-pagination-bottom: 8px;
|
651
|
+
--swiper-pagination-top: auto;
|
652
|
+
--swiper-pagination-fraction-color: inherit;
|
653
|
+
--swiper-pagination-progressbar-bg-color: rgba(0, 0, 0, 0.25);
|
654
|
+
--swiper-pagination-progressbar-size: 4px;
|
655
|
+
--swiper-pagination-bullet-size: 8px;
|
656
|
+
--swiper-pagination-bullet-width: 8px;
|
657
|
+
--swiper-pagination-bullet-height: 8px;
|
658
|
+
--swiper-pagination-bullet-inactive-color: #000;
|
659
|
+
--swiper-pagination-bullet-inactive-opacity: 0.2;
|
660
|
+
--swiper-pagination-bullet-opacity: 1;
|
661
|
+
--swiper-pagination-bullet-horizontal-gap: 4px;
|
662
|
+
--swiper-pagination-bullet-vertical-gap: 6px;
|
663
|
+
}
|
664
|
+
----
|
665
|
+
|
666
|
+
|
667
|
+
[role="mt-5"]
|
668
|
+
[[swiper-module-scrollbar]]
|
669
|
+
=== Scrollbar
|
670
|
+
|
671
|
+
The Scrollbar module in SwiperJS is a powerful tool that enhances user
|
672
|
+
interaction and provides visual feedback within your slider. Here's a
|
673
|
+
breakdown of its key functionalities:
|
674
|
+
|
675
|
+
Visual Indicator::
|
676
|
+
The module renders a visual scrollbar that dynamically reflects the
|
677
|
+
slider's current position. This provides users with a clear understanding
|
678
|
+
of where they are within the overall content.
|
679
|
+
|
680
|
+
Draggable Interaction::
|
681
|
+
The scrollbar can be made draggable, allowing users to directly control
|
682
|
+
the slider's position by moving the scrollbar handle. This offers an
|
683
|
+
alternative navigation method to swiping or clicking.
|
684
|
+
|
685
|
+
Customization::
|
686
|
+
You can extensively customize the appearance and behavior of the scrollbar
|
687
|
+
to match your project's design. This includes options for size, color,
|
688
|
+
position, and more.
|
689
|
+
|
690
|
+
[role="mt-4"]
|
691
|
+
==== Scrollbar Parameters
|
692
|
+
|
693
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
694
|
+
|===
|
695
|
+
|Name |Type |Default |Description \| Example
|
696
|
+
|
697
|
+
|link:#param-dragClass[dragClass] |string |'swiper-scrollbar-drag'
|
698
|
+
|Scrollbar draggable element CSS class
|
699
|
+
|
700
|
+
|link:#param-dragSize[dragSize] |number \| 'auto' |'auto' |Size of
|
701
|
+
scrollbar draggable element in px
|
702
|
+
|
703
|
+
|link:#param-draggable[draggable] |boolean |`false` |Set to `true` to
|
704
|
+
enable make scrollbar draggable that allows you to control slider
|
705
|
+
position
|
706
|
+
|
707
|
+
|link:#param-el[el] |any |null |String with CSS selector or HTML element
|
708
|
+
of the container with scrollbar.
|
709
|
+
|
710
|
+
|link:#param-enabled[enabled] |boolean | |Boolean property to use with
|
711
|
+
breakpoints to enable/disable scrollbar on certain breakpoints
|
712
|
+
|
713
|
+
|link:#param-hide[hide] |boolean |`true` |Hide scrollbar automatically
|
714
|
+
after user interaction
|
715
|
+
|
716
|
+
|link:#param-horizontalClass[horizontalClass] |string
|
717
|
+
|'swiper-scrollbar-horizontal' |CSS class name set to scrollbar in
|
718
|
+
horizontal Swiper
|
719
|
+
|
720
|
+
|link:#param-lockClass[lockClass] |string |'swiper-scrollbar-lock'
|
721
|
+
|Scrollbar element additional CSS class when it is disabled
|
722
|
+
|
723
|
+
|link:#param-scrollbarDisabledClass[scrollbarDisabledClass] |string
|
724
|
+
|'swiper-scrollbar-disabled' |CSS class name added on swiper container
|
725
|
+
and scrollbar element when scrollbar is disabled by breakpoint
|
726
|
+
|
727
|
+
|link:#param-snapOnRelease[snapOnRelease] |boolean |`false` |Set to
|
728
|
+
`true` to snap slider position to slides when you release scrollbar
|
729
|
+
|
730
|
+
|link:#param-verticalClass[verticalClass] |string
|
731
|
+
|'swiper-scrollbar-vertical' |CSS class name set to scrollbar in
|
732
|
+
vertical Swiper
|
733
|
+
|===
|
734
|
+
|
735
|
+
[role="mt-4"]
|
736
|
+
==== Scrollbar Methods
|
737
|
+
|
738
|
+
[cols=",,",]
|
739
|
+
|===
|
740
|
+
|Properties | |
|
741
|
+
|
742
|
+
|link:#prop-swiper-dragEl[swiper.dragEl] |HTMLElement |HTMLElement of
|
743
|
+
Scrollbar draggable handler element
|
744
|
+
|
745
|
+
|link:#prop-swiper-el[swiper.el] |HTMLElement |HTMLElement of Scrollbar
|
746
|
+
container element
|
747
|
+
|
748
|
+
|Methods | |
|
749
|
+
|
750
|
+
|link:#method-swiper-destroy[swiper.destroy()] | |Destroy scrollbar
|
751
|
+
|
752
|
+
|link:#method-swiper-init[swiper.init()] | |Initialize scrollbar
|
753
|
+
|
754
|
+
|link:#method-swiper-setTranslate[swiper.setTranslate()] | |Updates
|
755
|
+
scrollbar translate
|
756
|
+
|
757
|
+
|link:#method-swiper-updateSize[swiper.updateSize()] | |Updates
|
758
|
+
scrollbar track and handler sizes
|
759
|
+
|===
|
760
|
+
|
761
|
+
[role="mt-4"]
|
762
|
+
==== Scrollbar Events
|
763
|
+
|
764
|
+
[cols=",,",options="header",]
|
765
|
+
|===
|
766
|
+
|Name |Arguments |Description \| Example
|
767
|
+
|link:#event-scrollbarDragEnd[scrollbarDragEnd] |(swiper, event) |Event
|
768
|
+
will be fired on draggable scrollbar drag end
|
769
|
+
|
770
|
+
|link:#event-scrollbarDragMove[scrollbarDragMove] |(swiper, event)
|
771
|
+
|Event will be fired on draggable scrollbar drag move
|
772
|
+
|
773
|
+
|link:#event-scrollbarDragStart[scrollbarDragStart] |(swiper, event)
|
774
|
+
|Event will be fired on draggable scrollbar drag start
|
775
|
+
|===
|
776
|
+
|
777
|
+
[role="mt-4"]
|
778
|
+
==== Scrollbar CSS Properties
|
779
|
+
|
780
|
+
[source,language-css]
|
781
|
+
----
|
782
|
+
{
|
783
|
+
--swiper-scrollbar-border-radius: 10px;
|
784
|
+
--swiper-scrollbar-top: auto;
|
785
|
+
--swiper-scrollbar-bottom: 4px;
|
786
|
+
--swiper-scrollbar-left: auto;
|
787
|
+
--swiper-scrollbar-right: 4px;
|
788
|
+
--swiper-scrollbar-sides-offset: 1%;
|
789
|
+
--swiper-scrollbar-bg-color: rgba(0, 0, 0, 0.1);
|
790
|
+
--swiper-scrollbar-drag-bg-color: rgba(0, 0, 0, 0.5);
|
791
|
+
--swiper-scrollbar-size: 4px;
|
792
|
+
}
|
793
|
+
----
|
794
|
+
|
795
|
+
[role="mt-5"]
|
796
|
+
[[swiper-module-autoplay]]
|
797
|
+
=== Autoplay
|
798
|
+
|
799
|
+
The Autoplay module in SwiperJS is a powerful feature that allows you to
|
800
|
+
automatically transition between slides in your slider at a specified
|
801
|
+
interval. Here's a breakdown of its key functionalities:
|
802
|
+
|
803
|
+
Automatic Slide Transitions::
|
804
|
+
The primary function is to automatically move the slider to the next
|
805
|
+
slide after a defined delay.
|
806
|
+
|
807
|
+
Customization::
|
808
|
+
You can extensively customize the autoplay behavior:
|
809
|
+
|
810
|
+
* Delay:
|
811
|
+
Control the time interval between each slide transition.
|
812
|
+
* Disable on Interaction:
|
813
|
+
Stop autoplay when the user interacts with the slider (e.g., swiping, clicking).
|
814
|
+
* Reverse Direction:
|
815
|
+
Change the direction of autoplay (from right to left or vice versa).
|
816
|
+
* Disable on Interaction:
|
817
|
+
Stop autoplay when the user interacts with the slider.
|
818
|
+
|
819
|
+
[role="mt-4"]
|
820
|
+
[[swiper-modules-autoplay-parameters]]
|
821
|
+
==== Parameters
|
822
|
+
|
823
|
+
[cols="4,2,2,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
824
|
+
|===
|
825
|
+
|Name |Type |Default |Description \| Example
|
826
|
+
|
827
|
+
|`delay`
|
828
|
+
|number
|
829
|
+
|3000
|
830
|
+
|Delay between transitions (in ms). If this parameter is *not specified*,
|
831
|
+
auto play will be *disabled*.
|
832
|
+
|
833
|
+
If you need to specify different delay for specific slides you can do it
|
834
|
+
by using `data-swiper-autoplay` (in ms) *attribute* individually on each
|
835
|
+
slide.
|
836
|
+
|
837
|
+
[source, html]
|
838
|
+
----
|
839
|
+
<!-- hold this slide for 2 seconds -->
|
840
|
+
<div class="swiper-slide" data-swiper-autoplay="2000">
|
841
|
+
----
|
842
|
+
|
843
|
+
|`disableOnInteraction`
|
844
|
+
|boolean
|
845
|
+
|`true`
|
846
|
+
|Set to `false` and autoplay will *not be disabled* after *user interactions*
|
847
|
+
(swiping). It will be restarted every time after interaction.
|
848
|
+
|
849
|
+
|`pauseOnMouseEnter`
|
850
|
+
|boolean
|
851
|
+
|`false`
|
852
|
+
|When enabled, autoplay will *be paused* on pointer (mouse) enter
|
853
|
+
*over Swiper container*.
|
854
|
+
|
855
|
+
|`reverseDirection`
|
856
|
+
|boolean
|
857
|
+
|`false`
|
858
|
+
|Enables autoplay in *reverse direction*.
|
859
|
+
|
860
|
+
|`stopOnLastSlide`
|
861
|
+
|boolean
|
862
|
+
|`false`
|
863
|
+
|Enable this parameter and autoplay is *stopped* when the *last slide*
|
864
|
+
is reached.
|
865
|
+
|
866
|
+
[CAUTION]
|
867
|
+
====
|
868
|
+
This setting has *no effect* in *loop mode*.
|
869
|
+
====
|
870
|
+
|
871
|
+
|`waitForTransition`
|
872
|
+
|boolean
|
873
|
+
|`true`
|
874
|
+
|When enabled autoplay will *wait for wrapper transition* to *continue*.
|
875
|
+
Can be disabled in case of using Virtual Translate when your slider may
|
876
|
+
*not* have transitions.
|
877
|
+
|
878
|
+
|===
|
879
|
+
|
880
|
+
[role="mt-4"]
|
881
|
+
[[swiper-modules-autoplay-properties]]
|
882
|
+
==== Properties
|
883
|
+
|
884
|
+
[cols="3,3,6a", subs=+macros, options="header", width="100%", role="rtable"]
|
885
|
+
|===
|
886
|
+
|Name |Type |Description
|
887
|
+
|
888
|
+
|`paused`
|
889
|
+
|boolean
|
890
|
+
|Indicate whether autoplay is paused.
|
891
|
+
|
892
|
+
|`running`
|
893
|
+
|boolean
|
894
|
+
|Indicate whether autoplay is enabled and running.
|
895
|
+
|
896
|
+
|`timeLeft`
|
897
|
+
|number
|
898
|
+
|If autoplay is *paused*, it contains the *time left* (in ms) before
|
899
|
+
transition starts to *next slide*.
|
900
|
+
|
901
|
+
|===
|
902
|
+
|
903
|
+
[role="mt-4"]
|
904
|
+
[[swiper-modules-autoplay-methods]]
|
905
|
+
==== Methods
|
906
|
+
|
907
|
+
[cols="3,9a", subs=+macros, options="header", width="100%", role="rtable"]
|
908
|
+
|===
|
909
|
+
|Name |Description
|
910
|
+
|
911
|
+
|`paused`
|
912
|
+
|Pause autoplay.
|
913
|
+
|
914
|
+
|`resume`
|
915
|
+
|Resume autoplay.
|
916
|
+
|
917
|
+
|`start`
|
918
|
+
|Starts autoplay.
|
919
|
+
|
920
|
+
|`stop`
|
921
|
+
|Stops autoplay.
|
922
|
+
|
923
|
+
|===
|
924
|
+
|
925
|
+
Find all events availalable for the
|
926
|
+
[role="mt-4"]
|
927
|
+
[[swiper-modules-autoplay-events]]
|
928
|
+
==== Events
|
929
|
+
|
930
|
+
Find all events available for the *autoplay module*.
|
931
|
+
|
932
|
+
[NOTE]
|
933
|
+
====
|
934
|
+
All events receives *swiper* event *data* as an *argument*.
|
935
|
+
====
|
936
|
+
|
937
|
+
[role="mt-4"]
|
938
|
+
[[swiper-module-event-autoplay]]
|
939
|
+
===== autoplay
|
940
|
+
|
941
|
+
Event will be fired when *slide changed* with autoplay.
|
942
|
+
|
943
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
944
|
+
|===
|
945
|
+
|Usage
|
946
|
+
|
947
|
+
|
|
948
|
+
[source, js]
|
949
|
+
----
|
950
|
+
const swiper = new Swiper('.swiper', {
|
951
|
+
// option settings ...
|
952
|
+
on: {
|
953
|
+
autoplay: (swiper) => {
|
954
|
+
// do something
|
955
|
+
}
|
956
|
+
}
|
957
|
+
});
|
958
|
+
----
|
959
|
+
|
960
|
+
|===
|
961
|
+
|
962
|
+
[role="mt-4"]
|
963
|
+
[[swiper-module-event-autoplayPause]]
|
964
|
+
===== autoplayPause
|
965
|
+
|
966
|
+
Event will be fired on autoplay *pause*.
|
967
|
+
|
968
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
969
|
+
|===
|
970
|
+
|Usage
|
971
|
+
|
972
|
+
|
|
973
|
+
[source, js]
|
974
|
+
----
|
975
|
+
const swiper = new Swiper('.swiper', {
|
976
|
+
// option settings ...
|
977
|
+
on: {
|
978
|
+
autoplayPause: (swiper) => {
|
979
|
+
// do something
|
980
|
+
}
|
981
|
+
}
|
982
|
+
});
|
983
|
+
----
|
984
|
+
|
985
|
+
|===
|
986
|
+
|
987
|
+
[role="mt-4"]
|
988
|
+
[[swiper-module-event-autoplayResume]]
|
989
|
+
===== autoplayResume
|
990
|
+
|
991
|
+
Event will be fired on autoplay *resume*.
|
992
|
+
|
993
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
994
|
+
|===
|
995
|
+
|Usage
|
996
|
+
|
997
|
+
|
|
998
|
+
[source, js]
|
999
|
+
----
|
1000
|
+
const swiper = new Swiper('.swiper', {
|
1001
|
+
// option settings ...
|
1002
|
+
on: {
|
1003
|
+
autoplayResume: (swiper) => {
|
1004
|
+
// do something
|
1005
|
+
}
|
1006
|
+
}
|
1007
|
+
});
|
1008
|
+
----
|
1009
|
+
|
1010
|
+
|===
|
1011
|
+
|
1012
|
+
[role="mt-4"]
|
1013
|
+
[[swiper-module-event-autoplayStart]]
|
1014
|
+
===== autoplayStart
|
1015
|
+
|
1016
|
+
Event will be fired in case autoplay has been *started*.
|
1017
|
+
|
1018
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1019
|
+
|===
|
1020
|
+
|Usage
|
1021
|
+
|
1022
|
+
|
|
1023
|
+
[source, js]
|
1024
|
+
----
|
1025
|
+
const swiper = new Swiper('.swiper', {
|
1026
|
+
// option settings ...
|
1027
|
+
on: {
|
1028
|
+
autoplayStart: (swiper) => {
|
1029
|
+
// do something
|
1030
|
+
}
|
1031
|
+
}
|
1032
|
+
});
|
1033
|
+
----
|
1034
|
+
|
1035
|
+
|===
|
1036
|
+
|
1037
|
+
[role="mt-4"]
|
1038
|
+
[[swiper-module-event-autoplayStop]]
|
1039
|
+
===== autoplayStop
|
1040
|
+
|
1041
|
+
Event will be fired when autoplay has been *stopped*.
|
1042
|
+
|
1043
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1044
|
+
|===
|
1045
|
+
|Usage
|
1046
|
+
|
1047
|
+
|
|
1048
|
+
[source, js]
|
1049
|
+
----
|
1050
|
+
const swiper = new Swiper('.swiper', {
|
1051
|
+
// option settings ...
|
1052
|
+
on: {
|
1053
|
+
autoplayStop: (swiper) => {
|
1054
|
+
// do something
|
1055
|
+
}
|
1056
|
+
}
|
1057
|
+
});
|
1058
|
+
----
|
1059
|
+
|
1060
|
+
|===
|
1061
|
+
|
1062
|
+
[role="mt-4"]
|
1063
|
+
[[swiper-module-event-autoplayTimeLeft]]
|
1064
|
+
===== autoplayTimeLeft
|
1065
|
+
|
1066
|
+
Event fires *continuously* while autoplay is *enabled*. It
|
1067
|
+
contains *time left* (in ms) before transition to next slide
|
1068
|
+
and *percentage* of the *time* related to *autoplay delay*.
|
1069
|
+
|
1070
|
+
[NOTE]
|
1071
|
+
====
|
1072
|
+
Receives *swiper*, *timeLeft*, *percentage* event *data* as *arguments*.
|
1073
|
+
====
|
1074
|
+
|
1075
|
+
[cols="12a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1076
|
+
|===
|
1077
|
+
|Usage
|
1078
|
+
|
1079
|
+
|
|
1080
|
+
[source, js]
|
1081
|
+
----
|
1082
|
+
const swiper = new Swiper('.swiper', {
|
1083
|
+
// option settings ...
|
1084
|
+
on: {
|
1085
|
+
autoplayTimeLeft: (swiper, timeLeft, percentage) => {
|
1086
|
+
// do something
|
1087
|
+
}
|
1088
|
+
}
|
1089
|
+
});
|
1090
|
+
----
|
1091
|
+
|
1092
|
+
|===
|
1093
|
+
|
1094
|
+
|
1095
|
+
[role="mt-5"]
|
1096
|
+
[[swiper-module-free-mode]]
|
1097
|
+
=== Free Mode
|
1098
|
+
|
1099
|
+
In SwiperJS, the Free Mode module allows for a more *fluid* and *interactive*
|
1100
|
+
sliding experience. Here's a breakdown of its key features:
|
1101
|
+
|
1102
|
+
Free Movement::
|
1103
|
+
Slides can be freely dragged and positioned anywhere within the slider
|
1104
|
+
container.
|
1105
|
+
|
1106
|
+
Momentum::
|
1107
|
+
When the user releases the slide, it continues to move with momentum,
|
1108
|
+
simulating realistic inertia.
|
1109
|
+
|
1110
|
+
Sticky Option::
|
1111
|
+
This *optional* feature *snaps* the slide to the nearest position when
|
1112
|
+
it comes to rest, providing a more controlled experience.
|
1113
|
+
|
1114
|
+
[role="mt-4"]
|
1115
|
+
==== Free Mode Parameters
|
1116
|
+
|
1117
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1118
|
+
|===
|
1119
|
+
|Name |Type |Default |Description \| Example
|
1120
|
+
|
1121
|
+
|link:#param-enabled[enabled] |boolean |`false` |Whether the free mode is
|
1122
|
+
enabled
|
1123
|
+
|
1124
|
+
|link:#param-minimumVelocity[minimumVelocity] |number |0.02 |Minimum
|
1125
|
+
touchmove-velocity required to trigger free mode momentum
|
1126
|
+
|
1127
|
+
|link:#param-momentum[momentum] |boolean |`true` |If enabled, then slide
|
1128
|
+
will keep moving for a while after you release it
|
1129
|
+
|
1130
|
+
|link:#param-momentumBounce[momentumBounce] |boolean |`true` |Set to
|
1131
|
+
`false` if you want to disable momentum bounce in free mode
|
1132
|
+
|
1133
|
+
|link:#param-momentumBounceRatio[momentumBounceRatio] |number |1 |Higher
|
1134
|
+
value produces larger momentum bounce effect
|
1135
|
+
|
1136
|
+
|link:#param-momentumRatio[momentumRatio] |number |1 |Higher value
|
1137
|
+
produces larger momentum distance after you release slider
|
1138
|
+
|
1139
|
+
|link:#param-momentumVelocityRatio[momentumVelocityRatio] |number |1
|
1140
|
+
|Higher value produces larger momentum velocity after you release slider
|
1141
|
+
|
1142
|
+
|link:#param-sticky[sticky] |boolean |`false` |Set to enabled to enable
|
1143
|
+
snap to slides positions in free mode
|
1144
|
+
|===
|
1145
|
+
|
1146
|
+
|
1147
|
+
[role="mt-5"]
|
1148
|
+
[[swiper-module-grid]]
|
1149
|
+
=== Grid
|
1150
|
+
|
1151
|
+
The Grid module in SwiperJS allows you to create multi-row sliders,
|
1152
|
+
effectively arranging slides into a grid-like structure. Here's a
|
1153
|
+
breakdown of its key features:
|
1154
|
+
|
1155
|
+
Multi-row layouts::
|
1156
|
+
Define the number of rows (`grid.rows`) to control how slides are distributed
|
1157
|
+
within the slider.
|
1158
|
+
|
1159
|
+
Fill direction::
|
1160
|
+
Control how slides fill the rows:
|
1161
|
+
|
1162
|
+
* grid.fill: *row*, Slides fill rows from left to right.
|
1163
|
+
* grid.fill: *column*, Slides fill columns from top to bottom.
|
1164
|
+
|
1165
|
+
[role="mt-4"]
|
1166
|
+
==== Grid Parameters
|
1167
|
+
|
1168
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1169
|
+
|===
|
1170
|
+
|Name |Type |Default |Description \| Example
|
1171
|
+
|
1172
|
+
|link:#param-fill[fill] |'row' \| 'column' |'column' a|
|
1173
|
+
Can be `'column'` or `'row'`. Defines how slides should fill rows,
|
1174
|
+
by column or by row
|
1175
|
+
|
1176
|
+
____
|
1177
|
+
if used with loop mode make sure number of slides is even specified in
|
1178
|
+
loop mode requirements, or enable `loopAddBlankSlides` parameter
|
1179
|
+
____
|
1180
|
+
|
1181
|
+
|link:#param-rows[rows] |number |1 |Number of slides rows, for multirow
|
1182
|
+
layout
|
1183
|
+
|===
|
1184
|
+
|
1185
|
+
[role="mt-5"]
|
1186
|
+
[[swiper-module-manipulation]]
|
1187
|
+
=== Manipulation
|
1188
|
+
|
1189
|
+
The Manipulation module adds useful methods to SwiperJS for manipulating
|
1190
|
+
slides. The module provides methods for dynamically adding, removing, and
|
1191
|
+
rearranging slides within the slider.
|
1192
|
+
|
1193
|
+
[NOTE]
|
1194
|
+
====
|
1195
|
+
It makes sense to use it only with SwiperJS Core version, amd is *not*
|
1196
|
+
intended to be used with SwiperJS Environments like *React* or *Vue*.
|
1197
|
+
====
|
1198
|
+
|
1199
|
+
[role="mt-4"]
|
1200
|
+
==== Manipulation Methods
|
1201
|
+
|
1202
|
+
[width="100%",cols="34%,33%,33%",]
|
1203
|
+
|===
|
1204
|
+
|Methods | |
|
1205
|
+
|
1206
|
+
|link:#method-swiper-addSlide[swiper.addSlide([.text-orange]#index#,
|
1207
|
+
[.text-orange]#slides#)] | a|
|
1208
|
+
Add new slides to the required index. slides could be HTMLElement or
|
1209
|
+
HTML string with new slide or array with such slides, for example:
|
1210
|
+
|
1211
|
+
[source, js]
|
1212
|
+
----
|
1213
|
+
addSlide(1, '<div class="swiper-slide">Slide 10"</div>')
|
1214
|
+
addSlide(1, [
|
1215
|
+
'<div class="swiper-slide">Slide 10"</div>',
|
1216
|
+
'<div class="swiper-slide">Slide 11"</div>'
|
1217
|
+
]);
|
1218
|
+
----
|
1219
|
+
|
1220
|
+
|link:#method-swiper-appendSlide[swiper.appendSlide([.text-orange]#slides#)]
|
1221
|
+
| a|
|
1222
|
+
Add new slides to the end. slides could be HTMLElement or HTML string
|
1223
|
+
with new slide or array with such slides, for example:
|
1224
|
+
|
1225
|
+
[source, js]
|
1226
|
+
----
|
1227
|
+
appendSlide('<div class="swiper-slide">Slide 10"</div>')
|
1228
|
+
|
1229
|
+
appendSlide([
|
1230
|
+
'<div class="swiper-slide">Slide 10"</div>',
|
1231
|
+
'<div class="swiper-slide">Slide 11"</div>'
|
1232
|
+
]);
|
1233
|
+
|
1234
|
+
----
|
1235
|
+
|
1236
|
+
|link:#method-swiper-prependSlide[swiper.prependSlide([.text-orange]#slides#)]
|
1237
|
+
| a|
|
1238
|
+
Add new slides to the beginning. slides could be HTMLElement or HTML
|
1239
|
+
string with new slide or array with such slides, for example:
|
1240
|
+
|
1241
|
+
[source, js]
|
1242
|
+
----
|
1243
|
+
prependSlide('<div class="swiper-slide">Slide 0"</div>')
|
1244
|
+
|
1245
|
+
prependSlide([
|
1246
|
+
'<div class="swiper-slide">Slide 1"</div>',
|
1247
|
+
'<div class="swiper-slide">Slide 2"</div>'
|
1248
|
+
]);
|
1249
|
+
|
1250
|
+
----
|
1251
|
+
|
1252
|
+
|link:#method-swiper-removeAllSlides[swiper.removeAllSlides()] | |Remove
|
1253
|
+
all slides
|
1254
|
+
|
1255
|
+
|link:#method-swiper-removeSlide[swiper.removeSlide([.text-orange]#slideIndex#)]
|
1256
|
+
| a|
|
1257
|
+
Remove selected slides. slideIndex could be a number with slide index to
|
1258
|
+
remove or array with indexes.
|
1259
|
+
|
1260
|
+
[source, js]
|
1261
|
+
----
|
1262
|
+
removeSlide(0); // remove first slide
|
1263
|
+
removeSlide([0, 1]); // remove first and second slides
|
1264
|
+
removeAllSlides(); // Remove all slides
|
1265
|
+
|
1266
|
+
----
|
1267
|
+
|
1268
|
+
|===
|
1269
|
+
|
1270
|
+
[role="mt-5"]
|
1271
|
+
[[swiper-module-parallax]]
|
1272
|
+
=== Parallax
|
1273
|
+
|
1274
|
+
The SwiperJS parallax module supports parallax transition effects for
|
1275
|
+
swiper/slides nested elements. There are two types of parallax elements
|
1276
|
+
supported:
|
1277
|
+
|
1278
|
+
* Direct child elements of `swiper`. Parallax effect for such elements
|
1279
|
+
will depend on total slider progress. Useful for parallax backgrounds.
|
1280
|
+
|
1281
|
+
* Slides child elements. Parallax effect for such elements will depend
|
1282
|
+
on slide progress
|
1283
|
+
|
1284
|
+
To enable parallax effects you need to init SwiperJS instance with passed
|
1285
|
+
`parallax: true` parameter and add one of the following (or mix)
|
1286
|
+
attributes to required elements:
|
1287
|
+
|
1288
|
+
* `data-swiper-parallax`, enable transform-translate parallax transition.
|
1289
|
+
This attribute may accept:
|
1290
|
+
|
1291
|
+
** `number`, value in px (as for title, subtitle in example above) to
|
1292
|
+
move element depending on progress. In this case such element will be
|
1293
|
+
moved on ± this value in px depending on slide position (next or
|
1294
|
+
previous)
|
1295
|
+
|
1296
|
+
** `percentage`, (as for "parallax-bg") to move element depending on
|
1297
|
+
progress and on its size. In this case such element will be moved
|
1298
|
+
on ± this percentage of its size (width in horizontal direction,
|
1299
|
+
and height in vertical direction) depending on slide position
|
1300
|
+
(next or previous). So if element has 400px width and you specified
|
1301
|
+
data-swiper-parallax="50%" then it will be moved on ± 200px
|
1302
|
+
|
1303
|
+
* `data-swiper-parallax-x`, same but for x-axis direction
|
1304
|
+
* `data-swiper-parallax-y`, same but for y-axis direction
|
1305
|
+
* `data-swiper-parallax-scale`, scale ratio of the parallax element
|
1306
|
+
when it is in "inactive" (not on active slide) state
|
1307
|
+
* `data-swiper-parallax-opacity`, opacity of the parallax element
|
1308
|
+
when it is in "inactive" (not on active slide) state
|
1309
|
+
* `data-swiper-parallax-duration`, custom transition duration for
|
1310
|
+
parallax elements
|
1311
|
+
|
1312
|
+
[source, html]
|
1313
|
+
----
|
1314
|
+
<div class="swiper">
|
1315
|
+
<!-- Parallax background element -->
|
1316
|
+
<div
|
1317
|
+
class="parallax-bg"
|
1318
|
+
style="background-image:url(path/to/image.jpg)"
|
1319
|
+
data-swiper-parallax="-23%"
|
1320
|
+
></div>
|
1321
|
+
<div class="swiper-wrapper">
|
1322
|
+
<div class="swiper-slide">
|
1323
|
+
<!-- Each slide has parallax title -->
|
1324
|
+
<div class="title" data-swiper-parallax="-100">Slide 1</div>
|
1325
|
+
<!-- Parallax subtitle -->
|
1326
|
+
<div class="subtitle" data-swiper-parallax="-200">Subtitle</div>
|
1327
|
+
<!-- And parallax text with custom transition duration -->
|
1328
|
+
<div
|
1329
|
+
class="text"
|
1330
|
+
data-swiper-parallax="-300"
|
1331
|
+
data-swiper-parallax-duration="600"
|
1332
|
+
>
|
1333
|
+
<p>Lorem ipsum dolor sit amet, ...</p>
|
1334
|
+
</div>
|
1335
|
+
<!-- Opacity parallax -->
|
1336
|
+
<div data-swiper-parallax-opacity="0.5">I will change opacity</div>
|
1337
|
+
<!-- Scale parallax -->
|
1338
|
+
<div data-swiper-parallax-scale="0.15">I will change scale</div>
|
1339
|
+
</div>
|
1340
|
+
...
|
1341
|
+
</div>
|
1342
|
+
</div>
|
1343
|
+
----
|
1344
|
+
|
1345
|
+
[role="mt-4"]
|
1346
|
+
==== Parallax Parameters
|
1347
|
+
|
1348
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1349
|
+
|===
|
1350
|
+
|Name |Type |Default |Description \| Example
|
1351
|
+
|
1352
|
+
|link:#param-enabled[enabled] |boolean |`false` |Enable, if you want to
|
1353
|
+
use "parallaxed" elements inside of slider
|
1354
|
+
|===
|
1355
|
+
|
1356
|
+
[role="mt-5"]
|
1357
|
+
[[swiper-module-lazy-loading]]
|
1358
|
+
=== Lazy Loading
|
1359
|
+
|
1360
|
+
Since version 9 SwiperJSdoesn't have a specific lazy loading API, as it
|
1361
|
+
relies on native browser lazy loading feature. To use lazy loading, we
|
1362
|
+
just need to set `loading="lazy"` on images and add preloader element:
|
1363
|
+
|
1364
|
+
[source, html]
|
1365
|
+
----
|
1366
|
+
<div class="swiper">
|
1367
|
+
<div class="swiper-wrapper">
|
1368
|
+
<!-- Lazy image -->
|
1369
|
+
<div class="swiper-slide">
|
1370
|
+
<img src="path/to/picture-1.jpg" loading="lazy" />
|
1371
|
+
<div class="swiper-lazy-preloader"></div>
|
1372
|
+
</div>
|
1373
|
+
<!-- Lazy image with srcset -->
|
1374
|
+
<div class="swiper-slide">
|
1375
|
+
<img
|
1376
|
+
src="path/to/logo-small.png"
|
1377
|
+
srcset="path/to/logo-large.png 2x"
|
1378
|
+
loading="lazy"
|
1379
|
+
/>
|
1380
|
+
<div class="swiper-lazy-preloader"></div>
|
1381
|
+
</div>
|
1382
|
+
</div>
|
1383
|
+
</div>
|
1384
|
+
----
|
1385
|
+
|
1386
|
+
As you see:
|
1387
|
+
|
1388
|
+
* Lazy image must have `loading="lazy"` attribute
|
1389
|
+
* Add animated preloader spinner to slide which will be removed
|
1390
|
+
automatically after image loaded:
|
1391
|
+
|
1392
|
+
[source, html]
|
1393
|
+
----
|
1394
|
+
<div class="swiper-lazy-preloader"></div>
|
1395
|
+
----
|
1396
|
+
|
1397
|
+
Or white one for dark layout:
|
1398
|
+
|
1399
|
+
[source, html]
|
1400
|
+
----
|
1401
|
+
<div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
|
1402
|
+
----
|
1403
|
+
|
1404
|
+
[role="mt-5"]
|
1405
|
+
[[swiper-module-fade-effect]]
|
1406
|
+
=== Fade Effect
|
1407
|
+
|
1408
|
+
The Fade Effect module in SwiperJS is a powerful tool for creating smooth
|
1409
|
+
and visually appealing *transitions* between slides in your slider.
|
1410
|
+
|
1411
|
+
[NOTE]
|
1412
|
+
====
|
1413
|
+
Be sure to have the `effect` parameter set to _fade_ in order in order to
|
1414
|
+
make the module work.
|
1415
|
+
|
1416
|
+
Parameter `crossFade` should be set to `true` in order to avoid seeing
|
1417
|
+
content *behind* or *underneath*.
|
1418
|
+
====
|
1419
|
+
|
1420
|
+
[role="mt-4"]
|
1421
|
+
==== Fade Effect Parameters
|
1422
|
+
|
1423
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1424
|
+
|===
|
1425
|
+
|Name |Type |Default |Description \| Example
|
1426
|
+
|
1427
|
+
|link:#param-crossFade[crossFade] |boolean |`false` |Enables slides cross
|
1428
|
+
fade
|
1429
|
+
|===
|
1430
|
+
|
1431
|
+
[role="mt-5"]
|
1432
|
+
[[swiper-module-cover-effect]]
|
1433
|
+
=== Coverflow Effect
|
1434
|
+
|
1435
|
+
Be sure to have the `effect` param set to `'coverflow'` in order for
|
1436
|
+
this to work.
|
1437
|
+
|
1438
|
+
[role="mt-4"]
|
1439
|
+
==== Coverflow Effect Parameters
|
1440
|
+
|
1441
|
+
[cols=",,,",options="header",]
|
1442
|
+
|===
|
1443
|
+
|Name |Type |Default |Description \| Example
|
1444
|
+
|link:#param-depth[depth] |number |100 |Depth offset in px (slides
|
1445
|
+
translate in Z axis)
|
1446
|
+
|
1447
|
+
|link:#param-modifier[modifier] |number |1 |Effect multiplier
|
1448
|
+
|
1449
|
+
|link:#param-rotate[rotate] |number |50 |Slide rotate in degrees
|
1450
|
+
|
1451
|
+
|link:#param-scale[scale] |number |1 |Slide scale effect
|
1452
|
+
|
1453
|
+
|link:#param-slideShadows[slideShadows] |boolean |`true` |Enables slides
|
1454
|
+
shadows
|
1455
|
+
|
1456
|
+
|link:#param-stretch[stretch] |number |0 |Stretch space between slides
|
1457
|
+
(in px)
|
1458
|
+
|===
|
1459
|
+
|
1460
|
+
[role="mt-5"]
|
1461
|
+
[[swiper-module-flip-effect]]
|
1462
|
+
=== Flip Effect
|
1463
|
+
|
1464
|
+
The Flip Effect module in SwiperJS adds a 3D flip animation to the slides
|
1465
|
+
in your slider.
|
1466
|
+
|
1467
|
+
[NOTE]
|
1468
|
+
====
|
1469
|
+
Be sure to have the parameter `effect` set to _flip_ in order to make the
|
1470
|
+
module work.
|
1471
|
+
====
|
1472
|
+
|
1473
|
+
[role="mt-4"]
|
1474
|
+
==== Flip Effect Parameters
|
1475
|
+
|
1476
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1477
|
+
|===
|
1478
|
+
|Name |Type |Default |Description \| Example
|
1479
|
+
|
1480
|
+
|link:#param-limitRotation[limitRotation] |boolean |`true` |Limit edge
|
1481
|
+
slides rotation
|
1482
|
+
|
1483
|
+
|link:#param-slideShadows[slideShadows] |boolean |`true` |Enables slides
|
1484
|
+
shadows
|
1485
|
+
|===
|
1486
|
+
|
1487
|
+
|
1488
|
+
[role="mt-5"]
|
1489
|
+
[[swiper-module-cube-effect]]
|
1490
|
+
=== Cube Effect
|
1491
|
+
|
1492
|
+
The Cube Effect module in SwiperJS adds a 3D cube-like rotation effect
|
1493
|
+
to the *transitions* between slides in a SwiperJS slider instance.
|
1494
|
+
|
1495
|
+
[NOTE]
|
1496
|
+
====
|
1497
|
+
Be sure to have the parameter `effect` set to _cube_ in order to make the
|
1498
|
+
module work.
|
1499
|
+
====
|
1500
|
+
|
1501
|
+
[role="mt-4"]
|
1502
|
+
[[swiper-module-cube-effect-parameters]]
|
1503
|
+
==== Parameters
|
1504
|
+
|
1505
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1506
|
+
|===
|
1507
|
+
|Name |Type |Default |Description \| Example
|
1508
|
+
|
1509
|
+
|link:#param-shadow[shadow] |boolean |`true` |Enables main slider shadow
|
1510
|
+
|
1511
|
+
|link:#param-shadowOffset[shadowOffset] |number |20 |Main shadow offset
|
1512
|
+
in px
|
1513
|
+
|
1514
|
+
|link:#param-shadowScale[shadowScale] |number |0.94 |Main shadow scale
|
1515
|
+
ratio
|
1516
|
+
|
1517
|
+
|link:#param-slideShadows[slideShadows] |boolean |`true` |Enables slides
|
1518
|
+
shadows
|
1519
|
+
|
1520
|
+
|===
|
1521
|
+
|
1522
|
+
|
1523
|
+
[role="mt-5"]
|
1524
|
+
[[swiper-module-cards-effect]]
|
1525
|
+
=== Cards Effect
|
1526
|
+
|
1527
|
+
The Cards Effect module in SwiperJS adds a visually appealing, card-like
|
1528
|
+
sliding *animation* for *transitions* between slides in a SwiperJS slider
|
1529
|
+
instance.
|
1530
|
+
|
1531
|
+
[NOTE]
|
1532
|
+
====
|
1533
|
+
Be sure to have the parameter `effect` set to _cards_ in order to make the
|
1534
|
+
module work.
|
1535
|
+
====
|
1536
|
+
|
1537
|
+
[role="mt-4"]
|
1538
|
+
[[swiper-module-cards-effect-parameters]]
|
1539
|
+
==== Parameters
|
1540
|
+
|
1541
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1542
|
+
|===
|
1543
|
+
|Name |Type |Default |Description \| Example
|
1544
|
+
|
1545
|
+
|link:#param-perSlideOffset[perSlideOffset] |number |8 |Offset distance
|
1546
|
+
per slide (in px)
|
1547
|
+
|
1548
|
+
|link:#param-perSlideRotate[perSlideRotate] |number |2 |Rotate angle per
|
1549
|
+
slide (in degrees)
|
1550
|
+
|
1551
|
+
|link:#param-rotate[rotate] |boolean |`true` |Enables cards rotation
|
1552
|
+
|
1553
|
+
|link:#param-slideShadows[slideShadows] |boolean |`true` |Enables slides
|
1554
|
+
shadows
|
1555
|
+
|
1556
|
+
|===
|
1557
|
+
|
1558
|
+
|
1559
|
+
[role="mt-5"]
|
1560
|
+
[[swiper-module-creative-effect]]
|
1561
|
+
=== Creative Effect
|
1562
|
+
|
1563
|
+
The Creative Effect module in SwiperJS is a powerful tool for creating
|
1564
|
+
highly customized and visually striking slide transitions. Here's a breakdown
|
1565
|
+
of its key features:
|
1566
|
+
|
1567
|
+
Highly Customizable Transitions::
|
1568
|
+
Allows you to define unique transformations for each slide (previous, next,
|
1569
|
+
and active) using properties like translate, rotate, scale, opacity, and more.
|
1570
|
+
This flexibility enables you to create a wide range of effects, from subtle
|
1571
|
+
shifts to dramatic 3D transformations.
|
1572
|
+
|
1573
|
+
Precise Control::
|
1574
|
+
Offers fine-grained control over the timing and appearance of each effect
|
1575
|
+
by manipulating CSS properties directly. You can adjust the intensity,
|
1576
|
+
duration, and easing of transitions to achieve the desired visual impact.
|
1577
|
+
|
1578
|
+
[NOTE]
|
1579
|
+
====
|
1580
|
+
Be sure to have the parameter `effect` set to _creative_ in order to make
|
1581
|
+
the module work.
|
1582
|
+
====
|
1583
|
+
|
1584
|
+
[role="mt-4"]
|
1585
|
+
[[swiper-module-creative-effect-parameters]]
|
1586
|
+
==== Parameters
|
1587
|
+
|
1588
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1589
|
+
|===
|
1590
|
+
|Name |Type |Default |Description \| Example
|
1591
|
+
|
1592
|
+
|`limitProgress`
|
1593
|
+
|number
|
1594
|
+
|1
|
1595
|
+
|Limit progress/offset to amount of side slides. If `1`, then slides all
|
1596
|
+
slides after prev/next will have same state. If `2`, then all slides
|
1597
|
+
after 2nd before/after active will have same state, etc.
|
1598
|
+
|
1599
|
+
|`next`
|
1600
|
+
|CreativeEffectTransform
|
1601
|
+
|
|
1602
|
+
|Next slide transformations.
|
1603
|
+
|
1604
|
+
[source, js]
|
1605
|
+
----
|
1606
|
+
{
|
1607
|
+
// Array with translate X, Y and Z values
|
1608
|
+
translate: (string | number)[];
|
1609
|
+
// Array with rotate X, Y and Z values (in deg)
|
1610
|
+
rotate?: number[];
|
1611
|
+
// Slide opacity
|
1612
|
+
opacity?: number;
|
1613
|
+
// Slide scale
|
1614
|
+
scale?: number;
|
1615
|
+
// Enables slide shadow
|
1616
|
+
shadow?: boolean;
|
1617
|
+
// Transform origin, e.g. `left bottom`
|
1618
|
+
origin?: string;
|
1619
|
+
}
|
1620
|
+
----
|
1621
|
+
|
1622
|
+
|link:#param-perspective[perspective] |boolean |`true` |Enable this
|
1623
|
+
parameter if your custom transforms require 3D transformations
|
1624
|
+
(`translateZ`, `rotateX`, `rotateY` )
|
1625
|
+
|
1626
|
+
|link:#param-prev[prev] |CreativeEffectTransform | a|
|
1627
|
+
Previous slide transformations. Accepts object of the following type:
|
1628
|
+
|
1629
|
+
[source, js]
|
1630
|
+
----
|
1631
|
+
{
|
1632
|
+
// Array with translate X, Y and Z values
|
1633
|
+
translate: (string | number)[];
|
1634
|
+
// Array with rotate X, Y and Z values (in deg)
|
1635
|
+
rotate?: number[];
|
1636
|
+
// Slide opacity
|
1637
|
+
opacity?: number;
|
1638
|
+
// Slide scale
|
1639
|
+
scale?: number;
|
1640
|
+
// Enables slide shadow
|
1641
|
+
shadow?: boolean;
|
1642
|
+
// Transform origin, e.g. `left bottom`
|
1643
|
+
origin?: string;
|
1644
|
+
}
|
1645
|
+
----
|
1646
|
+
|
1647
|
+
|link:#param-progressMultiplier[progressMultiplier] |number |1 |Allows
|
1648
|
+
to multiply slides transformations and opacity.
|
1649
|
+
|
1650
|
+
|link:#param-shadowPerProgress[shadowPerProgress] |boolean |`false`
|
1651
|
+
|Splits shadow "opacity" per slide based on `limitProgress` (only if
|
1652
|
+
transformation shadows enabled). E.g. setting `limitProgress: 2` and
|
1653
|
+
enabling `shadowPerProgress`, will set shadow opacity to `0.5` and
|
1654
|
+
`1` on two slides next to active. With this parameter disabled, all
|
1655
|
+
slides beside active will have shadow with `1` opacity
|
1656
|
+
|
1657
|
+
|===
|
1658
|
+
|
1659
|
+
|
1660
|
+
[role="mt-5"]
|
1661
|
+
[[swiper-module-thumbs]]
|
1662
|
+
=== Thumbs
|
1663
|
+
|
1664
|
+
In SwiperJS, the Thumbs module enables to create a *thumbnail* navigation
|
1665
|
+
(slave) for (master) sliders.
|
1666
|
+
|
1667
|
+
In addition to the SwiperJS <<Controller>> module the API comes with the
|
1668
|
+
*Thumbs module* that is designed to work with a additional (slave)
|
1669
|
+
*thumbs swiper* for a *more correct* way for *syncing* two swipers.
|
1670
|
+
|
1671
|
+
[role="mt-4"]
|
1672
|
+
[[swiper-module-thumbs-parameters]]
|
1673
|
+
==== Parameters
|
1674
|
+
|
1675
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1676
|
+
|===
|
1677
|
+
|Name |Type |Default |Description \| Example
|
1678
|
+
|
1679
|
+
|link:#param-autoScrollOffset[autoScrollOffset] |number |0 |Allows to
|
1680
|
+
set on which thumbs active slide from edge it should automatically move
|
1681
|
+
scroll thumbs. For example, if set to 1 and last visible thumb will be
|
1682
|
+
activated (1 from edge) it will auto scroll thumbs
|
1683
|
+
|
1684
|
+
|link:#param-multipleActiveThumbs[multipleActiveThumbs] |boolean |`true`
|
1685
|
+
|When enabled multiple thumbnail slides may get activated
|
1686
|
+
|
1687
|
+
|link:#param-slideThumbActiveClass[slideThumbActiveClass] |string
|
1688
|
+
|'swiper-slide-thumb-active' |Additional class that will be added to
|
1689
|
+
activated thumbs swiper slide
|
1690
|
+
|
1691
|
+
|link:#param-swiper[swiper] |any |null |SwiperJS instance of swiper used
|
1692
|
+
as thumbs or object with SwiperJS API parameters to initialize thumbs swiper.
|
1693
|
+
|
1694
|
+
|link:#param-thumbsContainerClass[thumbsContainerClass] |string
|
1695
|
+
|'swiper-thumbs' |Additional class that will be added to thumbs swiper
|
1696
|
+
|===
|
1697
|
+
|
1698
|
+
[role="mt-4"]
|
1699
|
+
[[swiper-module-thumbs-properties]]
|
1700
|
+
==== Properties
|
1701
|
+
|
1702
|
+
[cols=",,",]
|
1703
|
+
|===
|
1704
|
+
|Properties | |
|
1705
|
+
|
1706
|
+
|link:#prop-swiper-swiper[swiper.swiper] |any |SwiperJS instance of
|
1707
|
+
thumbs swiper
|
1708
|
+
|
1709
|
+
|===
|
1710
|
+
|
1711
|
+
[role="mt-4"]
|
1712
|
+
[[swiper-module-thumbs-methods]]
|
1713
|
+
==== Methods
|
1714
|
+
|
1715
|
+
cols=",,",]
|
1716
|
+
|===
|
1717
|
+
|link:#method-swiper-init[swiper.init()] | |Initialize thumbs
|
1718
|
+
|
1719
|
+
|link:#method-swiper-update[swiper.update([.text-orange]#initial#)] |
|
1720
|
+
|Update thumbs
|
1721
|
+
|
1722
|
+
|===
|
1723
|
+
|
1724
|
+
|
1725
|
+
[role="mt-5"]
|
1726
|
+
[[swiper-module-zoom]]
|
1727
|
+
=== Zoom
|
1728
|
+
|
1729
|
+
SwiperJSsupports zoom images functionality (similar to what you see on
|
1730
|
+
iOS when browsing single photo) where you can zoom-in image by pinch
|
1731
|
+
gesture and or by zoom-in/out by double tap on it. In this case,
|
1732
|
+
additional layout is required:
|
1733
|
+
|
1734
|
+
[source, html]
|
1735
|
+
----
|
1736
|
+
<div class="swiper">
|
1737
|
+
<div class="swiper-wrapper">
|
1738
|
+
<div class="swiper-slide">
|
1739
|
+
<div class="swiper-zoom-container">
|
1740
|
+
<img src="path/to/image1.jpg" />
|
1741
|
+
</div>
|
1742
|
+
</div>
|
1743
|
+
<div class="swiper-slide">
|
1744
|
+
<div class="swiper-zoom-container">
|
1745
|
+
<img src="path/to/image2.jpg" />
|
1746
|
+
</div>
|
1747
|
+
</div>
|
1748
|
+
<div class="swiper-slide">Plain slide with text</div>
|
1749
|
+
<div class="swiper-slide">
|
1750
|
+
<!-- Override maxRatio parameter -->
|
1751
|
+
<div class="swiper-zoom-container" data-swiper-zoom="5">
|
1752
|
+
<img src="path/to/image1.jpg" />
|
1753
|
+
</div>
|
1754
|
+
</div>
|
1755
|
+
</div>
|
1756
|
+
</div>
|
1757
|
+
----
|
1758
|
+
|
1759
|
+
* All "zoomable" images should be wrapped with the div with
|
1760
|
+
`swiper-zoom-container` class.
|
1761
|
+
* By default it expects to zoom one of the `img`, `picture` or
|
1762
|
+
`canvas` element. If you want to make zoom on some other custom
|
1763
|
+
element, then just add `swiper-zoom-target` class to this element. For
|
1764
|
+
example:
|
1765
|
+
+
|
1766
|
+
[source, html]
|
1767
|
+
----
|
1768
|
+
<div class="swiper">
|
1769
|
+
<div class="swiper-wrapper">
|
1770
|
+
<div class="swiper-slide">
|
1771
|
+
<div class="swiper-zoom-container">
|
1772
|
+
<!-- custom zoomable element -->
|
1773
|
+
<div
|
1774
|
+
class="swiper-zoom-target"
|
1775
|
+
style="background-image: url(...)"
|
1776
|
+
></div>
|
1777
|
+
</div>
|
1778
|
+
</div>
|
1779
|
+
</div>
|
1780
|
+
</div>
|
1781
|
+
----
|
1782
|
+
* You can override `maxRatio` parameter for specific slides by using
|
1783
|
+
`data-swiper-zoom` attribute on zoom container.
|
1784
|
+
|
1785
|
+
[role="mt-4"]
|
1786
|
+
[[swiper-module-zoom-parameters]]
|
1787
|
+
==== Parameters
|
1788
|
+
|
1789
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1790
|
+
|===
|
1791
|
+
|Name |Type |Default |Description \| Example
|
1792
|
+
|
1793
|
+
|link:#param-containerClass[containerClass] |string
|
1794
|
+
|'swiper-zoom-container' |CSS class name of zoom container
|
1795
|
+
|
1796
|
+
|link:#param-limitToOriginalSize[limitToOriginalSize] |boolean |`false`
|
1797
|
+
|When set to true, the image will not be scaled past 100% of its
|
1798
|
+
original size
|
1799
|
+
|
1800
|
+
|link:#param-maxRatio[maxRatio] |number |3 |Maximum image zoom
|
1801
|
+
multiplier
|
1802
|
+
|
1803
|
+
|link:#param-minRatio[minRatio] |number |1 |Minimal image zoom
|
1804
|
+
multiplier
|
1805
|
+
|
1806
|
+
|link:#param-panOnMouseMove[panOnMouseMove] |boolean |`false` |When set to
|
1807
|
+
true, a zoomed in image will automatically pan while moving the mouse
|
1808
|
+
over the image
|
1809
|
+
|
1810
|
+
|link:#param-toggle[toggle] |boolean |`true` |Enable/disable zoom-in by
|
1811
|
+
slide's double tap
|
1812
|
+
|
1813
|
+
|link:#param-zoomedSlideClass[zoomedSlideClass] |string
|
1814
|
+
|'swiper-slide-zoomed' |CSS class name of zoomed in container
|
1815
|
+
|===
|
1816
|
+
|
1817
|
+
[role="mt-4"]
|
1818
|
+
[[swiper-module-zoom-methods]]
|
1819
|
+
==== Methods
|
1820
|
+
|
1821
|
+
[cols=",,",]
|
1822
|
+
|===
|
1823
|
+
|Properties | |
|
1824
|
+
|
1825
|
+
|link:#prop-swiper-enabled[swiper.enabled] |boolean |Whether the zoom
|
1826
|
+
module is enabled
|
1827
|
+
|
1828
|
+
|link:#prop-swiper-scale[swiper.scale] |number |Current image scale
|
1829
|
+
ratio
|
1830
|
+
|
1831
|
+
|Methods | |
|
1832
|
+
|
1833
|
+
|link:#method-swiper-disable[swiper.disable()] | |Disable zoom module
|
1834
|
+
|
1835
|
+
|link:#method-swiper-enable[swiper.enable()] | |Enable zoom module
|
1836
|
+
|
1837
|
+
|link:#method-swiper-in[swiper.in([.text-orange]#ratio#)] | |Zoom in
|
1838
|
+
image of the currently active slide. Optionally accepts custom zoom
|
1839
|
+
ratio
|
1840
|
+
|
1841
|
+
|link:#method-swiper-out[swiper.out()] | |Zoom out image of the
|
1842
|
+
currently active slide
|
1843
|
+
|
1844
|
+
|link:#method-swiper-toggle[swiper.toggle([.text-orange]#event#)] |
|
1845
|
+
|Toggle image zoom of the currently active slide
|
1846
|
+
|===
|
1847
|
+
|
1848
|
+
[role="mt-4"]
|
1849
|
+
[[swiper-module-zoom-events]]
|
1850
|
+
==== Events
|
1851
|
+
|
1852
|
+
The module allows you to zoom in and out of images *within* a slider.
|
1853
|
+
*Zoom Events* likely refers to *custom events* you might create or utilize
|
1854
|
+
within a SwiperJS implementation to:
|
1855
|
+
|
1856
|
+
* Trigger actions when zooming begins, ends, or changes.
|
1857
|
+
* Coordinate with other parts of your application based on zoom levels.
|
1858
|
+
* Enhance user interactions with dynamic effects or UI updates.
|
1859
|
+
|
1860
|
+
[cols=",,",options="header",]
|
1861
|
+
|===
|
1862
|
+
|Name |Arguments |Description \| Example
|
1863
|
+
|link:#event-zoomChange[zoomChange] |(swiper, scale, imageEl, slideEl)
|
1864
|
+
|Event will be fired on zoom change
|
1865
|
+
|===
|
1866
|
+
|
1867
|
+
|
1868
|
+
[role="mt-5"]
|
1869
|
+
[[swiper-module-keyboard-control]]
|
1870
|
+
=== Keyboard Control
|
1871
|
+
|
1872
|
+
The Keyboard Control module in SwiperJS enables *navigation* through slides
|
1873
|
+
using the keyboard. Here's a breakdown of its key functionalities:
|
1874
|
+
|
1875
|
+
Default Keys::
|
1876
|
+
Typically uses arrow keys (left/right) to navigate between slides.
|
1877
|
+
|
1878
|
+
Customizable::
|
1879
|
+
You can potentially configure it to use other keys if needed.
|
1880
|
+
|
1881
|
+
Viewport Control::
|
1882
|
+
This option allows you to control whether keyboard navigation works only
|
1883
|
+
when the SwiperJS instance is within the viewport. This can be useful to
|
1884
|
+
prevent *accidental navigation* when the swiper is off-screen.
|
1885
|
+
|
1886
|
+
|
1887
|
+
[role="mt-4"]
|
1888
|
+
[[swiper-module-keyboard-control-parameters]]
|
1889
|
+
==== Parameters
|
1890
|
+
|
1891
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1892
|
+
|===
|
1893
|
+
|Name |Type |Default |Description \| Example
|
1894
|
+
|
1895
|
+
|link:#param-enabled[enabled] |boolean |`false` |Set to `true` to enable
|
1896
|
+
keyboard control
|
1897
|
+
|
1898
|
+
|link:#param-onlyInViewport[onlyInViewport] |boolean |`true` |When enabled
|
1899
|
+
it will control sliders that are currently in viewport
|
1900
|
+
|
1901
|
+
|link:#param-pageUpDown[pageUpDown] |boolean |`true` |When enabled it will
|
1902
|
+
enable keyboard navigation by Page Up and Page Down keys
|
1903
|
+
|===
|
1904
|
+
|
1905
|
+
[role="mt-4"]
|
1906
|
+
[[swiper-module-keyboard-control-methods]]
|
1907
|
+
==== Methods
|
1908
|
+
|
1909
|
+
[cols=",,",]
|
1910
|
+
|===
|
1911
|
+
|Properties | |
|
1912
|
+
|
1913
|
+
|link:#prop-swiper-enabled[swiper.enabled] |boolean |Whether the
|
1914
|
+
keyboard control is enabled
|
1915
|
+
|
1916
|
+
|Methods | |
|
1917
|
+
|
1918
|
+
|link:#method-swiper-disable[swiper.disable()] | |Disable keyboard
|
1919
|
+
control
|
1920
|
+
|
1921
|
+
|link:#method-swiper-enable[swiper.enable()] | |Enable keyboard control
|
1922
|
+
|===
|
1923
|
+
|
1924
|
+
[role="mt-4"]
|
1925
|
+
[[swiper-module-keyboard-control-events]]
|
1926
|
+
==== Events
|
1927
|
+
|
1928
|
+
[cols=",,",options="header",]
|
1929
|
+
|===
|
1930
|
+
|Name |Arguments |Description \| Example
|
1931
|
+
|link:#event-keyPress[keyPress] |(swiper, keyCode) |Event will be fired
|
1932
|
+
on key press
|
1933
|
+
|===
|
1934
|
+
|
1935
|
+
|
1936
|
+
[role="mt-5"]
|
1937
|
+
[[swiper-module-mousewheel-control]]
|
1938
|
+
=== Mousewheel Control
|
1939
|
+
|
1940
|
+
The Mousewheel Control module in SwiperJS enables users to navigate
|
1941
|
+
through the slides of a SwiperJS instance using their mouse wheel. Here's a
|
1942
|
+
breakdown of its key functionalities:
|
1943
|
+
|
1944
|
+
Smooth Scrolling::
|
1945
|
+
Allows for smooth and intuitive navigation through slides by scrolling
|
1946
|
+
the mouse wheel.
|
1947
|
+
|
1948
|
+
Configurable::
|
1949
|
+
Offers options to customize mousewheel behavior, such as:
|
1950
|
+
|
1951
|
+
* releaseOnEdges: Allows page scrolling when the swiper reaches
|
1952
|
+
the beginning or end.
|
1953
|
+
|
1954
|
+
* invert: Inverts the scrolling direction e.g. for scrolling up moves to
|
1955
|
+
the next slide.
|
1956
|
+
|
1957
|
+
Axis Control::
|
1958
|
+
Can be configured to *restrict* mousewheel *scrolling* to a defined
|
1959
|
+
axis, e.g. for only *horizontal* scrolling in horizontal mode.
|
1960
|
+
|
1961
|
+
|
1962
|
+
[role="mt-4"]
|
1963
|
+
[[swiper-module-mousewheel-control-parameters]]
|
1964
|
+
==== Parameters
|
1965
|
+
|
1966
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
1967
|
+
|===
|
1968
|
+
|Name |Type |Default |Description \| Example
|
1969
|
+
|
1970
|
+
|link:#param-enabled[enabled] |boolean |`false` |Set to `true` to enable
|
1971
|
+
mousewheel control
|
1972
|
+
|
1973
|
+
|link:#param-eventsTarget[eventsTarget] |any |'container' |String with
|
1974
|
+
CSS selector or HTML element of the container accepting mousewheel
|
1975
|
+
events. By default it is swiper
|
1976
|
+
|
1977
|
+
|link:#param-forceToAxis[forceToAxis] |boolean |`false` |Set to `true`
|
1978
|
+
to force mousewheel swipes to axis. So in horizontal mode mousewheel
|
1979
|
+
will work only with horizontal mousewheel scrolling, and only with
|
1980
|
+
vertical scrolling in vertical mode.
|
1981
|
+
|
1982
|
+
|link:#param-invert[invert] |boolean |`false` |Set to `true` to invert
|
1983
|
+
sliding direction
|
1984
|
+
|
1985
|
+
|link:#param-noMousewheelClass[noMousewheelClass] |string
|
1986
|
+
|'swiper-no-mousewheel' |Scrolling on elements with this class will be
|
1987
|
+
ignored
|
1988
|
+
|
1989
|
+
|link:#param-releaseOnEdges[releaseOnEdges] |boolean |`false` |Set to
|
1990
|
+
`true` and swiper will release mousewheel event and allow page
|
1991
|
+
scrolling when swiper is on edge positions (in the beginning or in the
|
1992
|
+
end)
|
1993
|
+
|
1994
|
+
|link:#param-sensitivity[sensitivity] |number |1 |Multiplier of
|
1995
|
+
mousewheel data, allows to tweak mouse wheel sensitivity
|
1996
|
+
|
1997
|
+
|link:#param-thresholdDelta[thresholdDelta] |null \| number |null
|
1998
|
+
|Minimum mousewheel scroll delta to trigger swiper slide change
|
1999
|
+
|
2000
|
+
|link:#param-thresholdTime[thresholdTime] |null \| number |null |Minimum
|
2001
|
+
mousewheel scroll time delta (in ms) to trigger swiper slide change
|
2002
|
+
|===
|
2003
|
+
|
2004
|
+
[role="mt-4"]
|
2005
|
+
[[swiper-module-mousewheel-control-methods]]
|
2006
|
+
==== Methods
|
2007
|
+
|
2008
|
+
[cols=",,",]
|
2009
|
+
|===
|
2010
|
+
|Properties | |
|
2011
|
+
|
2012
|
+
|link:#prop-swiper-enabled[swiper.enabled] |boolean |Whether the
|
2013
|
+
mousewheel control is enabled
|
2014
|
+
|
2015
|
+
|Methods | |
|
2016
|
+
|
2017
|
+
|link:#method-swiper-disable[swiper.disable()] | |Disable mousewheel
|
2018
|
+
control
|
2019
|
+
|
2020
|
+
|link:#method-swiper-enable[swiper.enable()] | |Enable mousewheel
|
2021
|
+
control
|
2022
|
+
|===
|
2023
|
+
|
2024
|
+
[role="mt-4"]
|
2025
|
+
[[swiper-module-mousewheel-control-events]]
|
2026
|
+
==== Events
|
2027
|
+
|
2028
|
+
[cols=",,",options="header",]
|
2029
|
+
|===
|
2030
|
+
|Name |Arguments |Description \| Example
|
2031
|
+
|link:#event-scroll[scroll] |(swiper, event) |Event will be fired on
|
2032
|
+
mousewheel scroll
|
2033
|
+
|===
|
2034
|
+
|
2035
|
+
|
2036
|
+
[role="mt-5"]
|
2037
|
+
[[swiper-module-virtual-slides]]
|
2038
|
+
=== Virtual Slides
|
2039
|
+
|
2040
|
+
Virtual Slides module allows to keep just required amount of slides in
|
2041
|
+
DOM. It is very useful in terms in performance and memory issues if you
|
2042
|
+
have a lot of slides, especially slides with heavyweight DOM tree or
|
2043
|
+
images.
|
2044
|
+
|
2045
|
+
[NOTE]
|
2046
|
+
====
|
2047
|
+
Virtual Slides *doesn't work* with *Grid* module and if parameter
|
2048
|
+
`slidesPerView` is set to _auto_.
|
2049
|
+
====
|
2050
|
+
|
2051
|
+
[role="mt-4"]
|
2052
|
+
[[swiper-module-virtual-slides-parameters]]
|
2053
|
+
==== Parameters
|
2054
|
+
|
2055
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
2056
|
+
|===
|
2057
|
+
|Name |Type |Default |Description \| Example
|
2058
|
+
|
2059
|
+
|link:#param-addSlidesAfter[addSlidesAfter] |number |0 |Increases amount
|
2060
|
+
of pre-rendered slides after active slide
|
2061
|
+
|
2062
|
+
|link:#param-addSlidesBefore[addSlidesBefore] |number |0 |Increases
|
2063
|
+
amount of pre-rendered slides before active slide
|
2064
|
+
|
2065
|
+
|link:#param-cache[cache] |boolean |`true` |Enables DOM cache of rendering
|
2066
|
+
slides html elements. Once they are rendered they will be saved to cache
|
2067
|
+
and reused from it.
|
2068
|
+
|
2069
|
+
|link:#param-enabled[enabled] |boolean |`false` |Whether the virtual
|
2070
|
+
slides are enabled
|
2071
|
+
|
2072
|
+
|link:#param-renderExternal[renderExternal]
|
2073
|
+
|function([.text-primary]#data#) | a|
|
2074
|
+
Function for external rendering (e.g. using some other library to handle
|
2075
|
+
DOM manipulations and state like *React.js* or *Vue.js*). As an argument it
|
2076
|
+
accepts `data` object with the following properties:
|
2077
|
+
|
2078
|
+
* `offset`, slides left/top offset in px
|
2079
|
+
* `from`, index of first slide required to be rendered
|
2080
|
+
* `to`, index of last slide required to be rendered
|
2081
|
+
* `slides`, array with slide items to be rendered
|
2082
|
+
|
2083
|
+
|link:#param-renderExternalUpdate[renderExternalUpdate] |boolean |`true`
|
2084
|
+
|When enabled (by default) it will update swiper layout right after
|
2085
|
+
renderExternal called. Useful to disable and update swiper manually when
|
2086
|
+
used with render libraries that renders asynchronously
|
2087
|
+
|
2088
|
+
|link:#param-renderSlide[renderSlide] |function([.text-primary]#slide#,
|
2089
|
+
[.text-primary]#index#) | |Function to render slide. As an argument it
|
2090
|
+
accepts current slide item for `slides` array and index number of the
|
2091
|
+
current slide. Function must return an outer HTML of the swiper slide or
|
2092
|
+
slide HTML element.
|
2093
|
+
|
2094
|
+
|link:#param-slides[slides] |T[] |[] |Array with slides
|
2095
|
+
|===
|
2096
|
+
|
2097
|
+
[role="mt-4"]
|
2098
|
+
[[swiper-module-virtual-slides-methods]]
|
2099
|
+
==== Methods
|
2100
|
+
|
2101
|
+
[width="100%",cols="34%,33%,33%",]
|
2102
|
+
|===
|
2103
|
+
|Properties | |
|
2104
|
+
|
2105
|
+
|link:#prop-swiper-cache[swiper.cache] |object |Object with cached
|
2106
|
+
slides HTML elements
|
2107
|
+
|
2108
|
+
|link:#prop-swiper-from[swiper.from] |number |Index of first rendered
|
2109
|
+
slide
|
2110
|
+
|
2111
|
+
|link:#prop-swiper-slides[swiper.slides] |[.text-green]#T[]# |Array with
|
2112
|
+
slide items passed by `virtual.slides` parameter
|
2113
|
+
|
2114
|
+
|link:#prop-swiper-to[swiper.to] |number |Index of last rendered slide
|
2115
|
+
|
2116
|
+
|Methods | |
|
2117
|
+
|
2118
|
+
|link:#method-swiper-appendSlide[swiper.appendSlide([.text-orange]#slide#)]
|
2119
|
+
| a|
|
2120
|
+
Append slide. `slides` can be a single slide item or array with such
|
2121
|
+
slides.
|
2122
|
+
|
2123
|
+
____
|
2124
|
+
Only for Core version (in React & Vue it should be done by modifying
|
2125
|
+
slides array/data/source)
|
2126
|
+
____
|
2127
|
+
|
2128
|
+
|link:#method-swiper-prependSlide[swiper.prependSlide([.text-orange]#slide#)]
|
2129
|
+
| a|
|
2130
|
+
Prepend slide. `slides` can be a single slide item or array with such
|
2131
|
+
slides.
|
2132
|
+
|
2133
|
+
____
|
2134
|
+
Only for Core version (in React & Vue it should be done by modifying
|
2135
|
+
slides array/data/source)
|
2136
|
+
____
|
2137
|
+
|
2138
|
+
|link:#method-swiper-removeAllSlides[swiper.removeAllSlides()] | a|
|
2139
|
+
Remove all slides
|
2140
|
+
|
2141
|
+
____
|
2142
|
+
Only for Core version (in React & Vue it should be done by modifying
|
2143
|
+
slides array/data/source)
|
2144
|
+
____
|
2145
|
+
|
2146
|
+
|link:#method-swiper-removeSlide[swiper.removeSlide([.text-orange]#slideIndexes#)]
|
2147
|
+
| a|
|
2148
|
+
Remove specific slide or slides. `slideIndexes` can be a number with
|
2149
|
+
slide index to remove or array with indexes.
|
2150
|
+
|
2151
|
+
____
|
2152
|
+
Only for Core version (in React & Vue it should be done by modifying
|
2153
|
+
slides array/data/source)
|
2154
|
+
____
|
2155
|
+
|
2156
|
+
|link:#method-swiper-update[swiper.update([.text-orange]#force#)] |
|
2157
|
+
|Update virtual slides state
|
2158
|
+
|===
|
2159
|
+
|
2160
|
+
[role="mt-4"]
|
2161
|
+
[[swiper-module-virtual-slides-dom]]
|
2162
|
+
==== DOM
|
2163
|
+
|
2164
|
+
Since version 9, SwiperJS virtual slides can work with slides originally
|
2165
|
+
rendered in DOM. On initialize it will remove them from DOM, cache and
|
2166
|
+
then re-use the ones which are required:
|
2167
|
+
|
2168
|
+
[source, html]
|
2169
|
+
----
|
2170
|
+
<div class="swiper">
|
2171
|
+
<div class="swiper-wrapper">
|
2172
|
+
<div class="swiper-slide">Slide 1</div>
|
2173
|
+
<div class="swiper-slide">Slide 2</div>
|
2174
|
+
...
|
2175
|
+
<div class="swiper-slide">Slide 100</div>
|
2176
|
+
</div>
|
2177
|
+
</div>
|
2178
|
+
|
2179
|
+
<script>
|
2180
|
+
const swiper = new Swiper('.swiper', {
|
2181
|
+
virtual: {
|
2182
|
+
enabled: true
|
2183
|
+
}
|
2184
|
+
});
|
2185
|
+
</script>
|
2186
|
+
----
|
2187
|
+
|
2188
|
+
[role="mt-5"]
|
2189
|
+
[[swiper-module-hash-navigation]]
|
2190
|
+
=== Hash Navigation
|
2191
|
+
|
2192
|
+
Hash navigation is intended to have a link to specific slide that allows
|
2193
|
+
to load page with specific slide opened.
|
2194
|
+
|
2195
|
+
To make it work, you need to enable it by passing:
|
2196
|
+
|
2197
|
+
* `hashNavigation: true` parameter and adding slides hashes in
|
2198
|
+
* `data-hash` attribute:
|
2199
|
+
|
2200
|
+
[source, html]
|
2201
|
+
----
|
2202
|
+
<div class="swiper">
|
2203
|
+
<div class="swiper-wrapper">
|
2204
|
+
<div class="swiper-slide" data-hash="slide1">Slide 1</div>
|
2205
|
+
<div class="swiper-slide" data-hash="slide2">Slide 2</div>
|
2206
|
+
<div class="swiper-slide" data-hash="slide3">Slide 3</div>
|
2207
|
+
<div class="swiper-slide" data-hash="slide4">Slide 4</div>
|
2208
|
+
<div class="swiper-slide" data-hash="slide5">Slide 5</div>
|
2209
|
+
...
|
2210
|
+
</div>
|
2211
|
+
</div>
|
2212
|
+
----
|
2213
|
+
|
2214
|
+
[source, js]
|
2215
|
+
----
|
2216
|
+
const swiper = new Swiper('.swiper', {
|
2217
|
+
//enable hash navigation
|
2218
|
+
hashNavigation: true
|
2219
|
+
});
|
2220
|
+
----
|
2221
|
+
|
2222
|
+
[role="mt-4"]
|
2223
|
+
[[swiper-module-hash-navigation-parameters]]
|
2224
|
+
==== Parameters
|
2225
|
+
|
2226
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
2227
|
+
|===
|
2228
|
+
|Name |Type |Default |Description \| Example
|
2229
|
+
|
2230
|
+
|link:#param-getSlideIndex[getSlideIndex]
|
2231
|
+
|function([.text-primary]#swiper#, [.text-primary]#hash#) | |Designed to
|
2232
|
+
be used with Virtual slides when it is impossible to find slide in DOM
|
2233
|
+
by hash (e.g. not yet rendered)
|
2234
|
+
|
2235
|
+
|link:#param-replaceState[replaceState] |boolean |`false` |Works in
|
2236
|
+
addition to hashnav to replace current url state with the new one
|
2237
|
+
instead of adding it to history
|
2238
|
+
|
2239
|
+
|link:#param-watchState[watchState] |boolean |`false` |Set to `true` to
|
2240
|
+
enable also navigation through slides (when hashnav is enabled) by
|
2241
|
+
browser history or by setting directly hash on document location
|
2242
|
+
|===
|
2243
|
+
|
2244
|
+
[role="mt-4"]
|
2245
|
+
[[swiper-module-hash-navigation-events]]
|
2246
|
+
==== Events
|
2247
|
+
|
2248
|
+
[cols=",,",options="header",]
|
2249
|
+
|===
|
2250
|
+
|Name |Arguments |Description \| Example
|
2251
|
+
|link:#event-hashChange[hashChange] |(swiper) |Event will be fired on
|
2252
|
+
window hash change
|
2253
|
+
|
2254
|
+
|link:#event-hashSet[hashSet] |(swiper) |Event will be fired when swiper
|
2255
|
+
updates the hash
|
2256
|
+
|===
|
2257
|
+
|
2258
|
+
[role="mt-5"]
|
2259
|
+
[[swiper-module-history-navigation]]
|
2260
|
+
=== History Navigation
|
2261
|
+
|
2262
|
+
The History Navigation module in SwiperJS allows you to integrate Swiper
|
2263
|
+
with *history* of your browser. This means, when you navigate between slides
|
2264
|
+
in your Swiper, the browser's URL will be updated to reflect the current
|
2265
|
+
slide. This is useful for:
|
2266
|
+
|
2267
|
+
Browser back/forward buttons:: Users can navigate through the slides
|
2268
|
+
using their browser's back and forward buttons, providing a familiar and
|
2269
|
+
intuitive user experience.
|
2270
|
+
|
2271
|
+
Bookmarking specific slides::
|
2272
|
+
Users can easily bookmark a particular slide and return to it later.
|
2273
|
+
|
2274
|
+
Sharing specific slides::
|
2275
|
+
Sharing the URL of a specific slide with others allows them to directly
|
2276
|
+
access that slide.
|
2277
|
+
|
2278
|
+
SEO:: Search engines can index *individual slides* and potentially this may
|
2279
|
+
*improve* your website's *search rank*.
|
2280
|
+
|
2281
|
+
[role="mt-4"]
|
2282
|
+
[[swiper-module-history-navigation-parameters]]
|
2283
|
+
==== Parameters
|
2284
|
+
|
2285
|
+
[cols="2,2,2,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
2286
|
+
|===
|
2287
|
+
|Name |Type |Default |Description \| Example
|
2288
|
+
|
2289
|
+
|`enabled`
|
2290
|
+
|boolean
|
2291
|
+
|`false`
|
2292
|
+
|Enables the History Plugin.
|
2293
|
+
|
2294
|
+
|`keepQuery`
|
2295
|
+
|boolean
|
2296
|
+
|`false`
|
2297
|
+
|Keep query parameters when changing browser url.
|
2298
|
+
|
2299
|
+
|`key`
|
2300
|
+
|string
|
2301
|
+
|_slides_
|
2302
|
+
|URL key for slides.
|
2303
|
+
|
2304
|
+
|`replaceState`
|
2305
|
+
|boolean
|
2306
|
+
|`false`
|
2307
|
+
|Works in addition to hashnav or history to replace current url state
|
2308
|
+
with the new one instead of adding it to history.
|
2309
|
+
|
2310
|
+
|`root`
|
2311
|
+
|string
|
2312
|
+
|empty string
|
2313
|
+
|swiper page root, useful to specify when you use SwiperJS history mode
|
2314
|
+
not on root website page. For example can be `https://my-website.com/` or
|
2315
|
+
`https://my-website.com/subpage/` or `/subpage/`
|
2316
|
+
|===
|
2317
|
+
|
2318
|
+
|
2319
|
+
[role="mt-5"]
|
2320
|
+
[[swiper-module-controller]]
|
2321
|
+
=== Controller
|
2322
|
+
|
2323
|
+
In SwiperJS, the Controller module allows to *synchronize* the *movement*
|
2324
|
+
of one or *multiple* slider instances. This is incredibly useful for
|
2325
|
+
creating complex, *interconnected* slider experiences. Here's a breakdown of
|
2326
|
+
its key functionalities:
|
2327
|
+
|
2328
|
+
Master/Slave Relationship::
|
2329
|
+
You designate one swiper instance as the *master* and others as *slaves*.
|
2330
|
+
|
2331
|
+
Synchronized Slides::
|
2332
|
+
When the *master* swiper *changes* slides, the slave swipers automatically
|
2333
|
+
move to the *corresponding* position.
|
2334
|
+
|
2335
|
+
Inverse Control::
|
2336
|
+
You can configure the slaves to move in the *opposite* direction of the
|
2337
|
+
master.
|
2338
|
+
|
2339
|
+
By Slide or by Progress::
|
2340
|
+
Control can be based on the *slide index* of the master or its overall
|
2341
|
+
*progress percentage*.
|
2342
|
+
|
2343
|
+
|
2344
|
+
[role="mt-4"]
|
2345
|
+
[[swiper-module-controller-parameters]]
|
2346
|
+
==== Parameters
|
2347
|
+
|
2348
|
+
Find all available *parameters* available for a *Controller*.
|
2349
|
+
|
2350
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
2351
|
+
|===
|
2352
|
+
|Name |Type |Default |Description \| Example
|
2353
|
+
|
2354
|
+
|`by`
|
2355
|
+
|_slide_ \| _container_
|
2356
|
+
|_slide_
|
2357
|
+
|Defines, as a *string*, to *control* another slider or (multiple sliders)
|
2358
|
+
slide by slide. With respect to other slider's *grid* or depending on all
|
2359
|
+
sliders *container*, depending on total slider percentage.
|
2360
|
+
|
2361
|
+
|`control`
|
2362
|
+
|any
|
2363
|
+
|*no default*
|
2364
|
+
|Pass another sniper instance or an *array* of (multiple) sniper instances
|
2365
|
+
that should be controlled by this swiper. Also accepts a *string* with a
|
2366
|
+
*CSS selector* or the *HTML Element* of a swiper.
|
2367
|
+
|
2368
|
+
|`inverse`
|
2369
|
+
|boolean
|
2370
|
+
|`false`
|
2371
|
+
|If set to `true`, the controlling *direction* will be *inverted*.
|
2372
|
+
|
2373
|
+
|===
|
2374
|
+
|
2375
|
+
[role="mt-4"]
|
2376
|
+
[[swiper-module-controller-methods]]
|
2377
|
+
==== Methods
|
2378
|
+
|
2379
|
+
Find all available *methods* available for a *Controller*.
|
2380
|
+
|
2381
|
+
[role="mt-4"]
|
2382
|
+
[[swiper-module-controller-methods-control]]
|
2383
|
+
===== control
|
2384
|
+
|
2385
|
+
Pass an other swiper instance or an *array* of (multiple) instances that
|
2386
|
+
should be *controlled* by this swiper.
|
2387
|
+
|
2388
|
+
[cols="6a,6a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
2389
|
+
|===
|
2390
|
+
|Synopsis |Description \| Parameters
|
2391
|
+
|
2392
|
+
|
|
2393
|
+
[source, js]
|
2394
|
+
----
|
2395
|
+
// single instance
|
2396
|
+
swiper.control(instance);
|
2397
|
+
|
2398
|
+
// multiple instances
|
2399
|
+
swiper.control(instances[]);
|
2400
|
+
----
|
2401
|
+
|
2402
|
+
|Pass an other swiper instance or an *array* of (multiple) swiper instances
|
2403
|
+
that should be *controlled* by this swiper.
|
2404
|
+
|
2405
|
+
|===
|
2406
|
+
|
2407
|
+
|
2408
|
+
[role="mt-5"]
|
2409
|
+
[[swiper-modules-a11y]]
|
2410
|
+
=== Accessibility (a11y)
|
2411
|
+
|
2412
|
+
Enable and configure *Accessibility* (a11y) module features of SwiperJS
|
2413
|
+
available for **screen readers** and other *assistive technologies*. By using
|
2414
|
+
the parameter and its options, you can *significantly enhance* the
|
2415
|
+
accessibility for *users with disabilities*:
|
2416
|
+
|
2417
|
+
Keyboard Navigation::
|
2418
|
+
Enables users to navigate slides using keyboard arrows.
|
2419
|
+
|
2420
|
+
Screen Reader Support::
|
2421
|
+
Provides meaningful information to *screen readers* about the slider,
|
2422
|
+
such as the number of slides and the current slide.
|
2423
|
+
|
2424
|
+
Customizable Messages::
|
2425
|
+
Allows you to provide custom messages for *screen readers*, improving
|
2426
|
+
user experience.
|
2427
|
+
|
2428
|
+
[role="mt-4"]
|
2429
|
+
[[swiper-modules-a11y-parameters]]
|
2430
|
+
==== Parameters
|
2431
|
+
|
2432
|
+
[cols="3,2,3,4a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
|
2433
|
+
|===
|
2434
|
+
|Name |Type |Default |Description \| Example
|
2435
|
+
|
2436
|
+
|`containerMessage`
|
2437
|
+
|null \| string
|
2438
|
+
|null
|
2439
|
+
|Message for *screen readers* for *outer* swiper container.
|
2440
|
+
|
2441
|
+
|`containerRole`
|
2442
|
+
|null \| string
|
2443
|
+
|null
|
2444
|
+
|Value of the *role attribute* to be set on the *swiper container*.
|
2445
|
+
|
2446
|
+
|`containerRoleDescriptionMessage`
|
2447
|
+
|null \| string
|
2448
|
+
|null
|
2449
|
+
|Message for *screen readers* describing the role of *outer* swiper container.
|
2450
|
+
|
2451
|
+
|`enabled`
|
2452
|
+
|boolean
|
2453
|
+
|`true`
|
2454
|
+
|Enables the Accessibility Module (a11y).
|
2455
|
+
|
2456
|
+
|`firstSlideMessage`
|
2457
|
+
|string
|
2458
|
+
|_This is the first slide_
|
2459
|
+
|Message for *screen readers* for *previous button* when swiper
|
2460
|
+
is on *first slide*.
|
2461
|
+
|
2462
|
+
|`id`
|
2463
|
+
|null \| string \| number
|
2464
|
+
|null
|
2465
|
+
|Value of the id attribute to be set on *swiper-wrapper*. If set to
|
2466
|
+
`null` the *id* will be *generated automatically*.
|
2467
|
+
|
2468
|
+
|`itemRoleDescriptionMessage`
|
2469
|
+
|null \| string
|
2470
|
+
|null
|
2471
|
+
|Message for *screen readers* describing *the role* of a slide element.
|
2472
|
+
|
2473
|
+
|`lastSlideMessage`
|
2474
|
+
|string
|
2475
|
+
|_This is the last slide_
|
2476
|
+
|Message for *screen readers* for *next button* when swiper
|
2477
|
+
is on *last slide*.
|
2478
|
+
|
2479
|
+
|`nextSlideMessage`
|
2480
|
+
|string
|
2481
|
+
|_Next slide_
|
2482
|
+
|Message for *screen readers* for the *next button*.
|
2483
|
+
|
2484
|
+
|`notificationClass`
|
2485
|
+
|string
|
2486
|
+
|_swiper-notification_
|
2487
|
+
|*CSS class name* of A11y notification.
|
2488
|
+
|
2489
|
+
|`paginationBulletMessage`
|
2490
|
+
|string
|
2491
|
+
|_Go to slide **{{index}}**_
|
2492
|
+
|Message for *screen readers* for *single pagination bullet*.
|
2493
|
+
|
2494
|
+
|`prevSlideMessage`
|
2495
|
+
|string
|
2496
|
+
|_Previous slide_
|
2497
|
+
|Message for *screen readers* for the *previous button*.
|
2498
|
+
|
2499
|
+
|`scrollOnFocus`
|
2500
|
+
|boolean
|
2501
|
+
|`true`
|
2502
|
+
|Enables *scrolling* to the slide that has been *focused*.
|
2503
|
+
|
2504
|
+
|`slideLabelMessage`
|
2505
|
+
|string
|
2506
|
+
|_**{{index}}**_ \| _**{{slidesLength}}**_
|
2507
|
+
|Message for *screen readers* describing the label of the *slide element*.
|
2508
|
+
|
2509
|
+
|`slideRole`
|
2510
|
+
|string
|
2511
|
+
|_group_
|
2512
|
+
|Value of swiper slide *role attribute*.
|
2513
|
+
|
2514
|
+
|===
|