1 | import { A11yOptions } from './modules/a11y';
|
2 | import { AutoplayOptions } from './modules/autoplay';
|
3 | import { ControllerOptions } from './modules/controller';
|
4 | import { CoverflowEffectOptions } from './modules/effect-coverflow';
|
5 | import { CubeEffectOptions } from './modules/effect-cube';
|
6 | import { FadeEffectOptions } from './modules/effect-fade';
|
7 | import { FlipEffectOptions } from './modules/effect-flip';
|
8 | import { CreativeEffectOptions } from './modules/effect-creative';
|
9 | import { CardsEffectOptions } from './modules/effect-cards';
|
10 | import { HashNavigationOptions } from './modules/hash-navigation';
|
11 | import { HistoryOptions } from './modules/history';
|
12 | import { KeyboardOptions } from './modules/keyboard';
|
13 | import { LazyOptions } from './modules/lazy';
|
14 | import { MousewheelOptions } from './modules/mousewheel';
|
15 | import { NavigationOptions } from './modules/navigation';
|
16 | import { PaginationOptions } from './modules/pagination';
|
17 | import { ParallaxOptions } from './modules/parallax';
|
18 | import { ScrollbarOptions } from './modules/scrollbar';
|
19 | import { ThumbsOptions } from './modules/thumbs';
|
20 | import { VirtualOptions } from './modules/virtual';
|
21 | import { ZoomOptions } from './modules/zoom';
|
22 | import { FreeModeOptions } from './modules/free-mode';
|
23 | import { GridOptions } from './modules/grid';
|
24 |
|
25 | import { CSSSelector, SwiperModule } from './shared';
|
26 | import { SwiperEvents } from './swiper-events';
|
27 |
|
28 | export interface SwiperOptions {
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | modules?: SwiperModule[];
|
42 | |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | init?: boolean;
|
49 |
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 | enabled?: boolean;
|
56 |
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 | updateOnWindowResize?: boolean;
|
63 |
|
64 | |
65 |
|
66 |
|
67 |
|
68 |
|
69 | resizeObserver?: boolean;
|
70 |
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | initialSlide?: number;
|
77 |
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 | direction?: 'horizontal' | 'vertical';
|
84 |
|
85 | |
86 |
|
87 |
|
88 |
|
89 |
|
90 | speed?: number;
|
91 |
|
92 | |
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | setWrapperSize?: boolean;
|
99 |
|
100 | |
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 | virtualTranslate?: boolean;
|
107 |
|
108 | |
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | width?: number | null;
|
117 |
|
118 | |
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 | height?: number | null;
|
127 |
|
128 | |
129 |
|
130 |
|
131 |
|
132 |
|
133 | autoHeight?: boolean;
|
134 |
|
135 | |
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | roundLengths?: boolean;
|
142 |
|
143 | |
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 | nested?: boolean;
|
150 |
|
151 | |
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 | createElements?: boolean;
|
159 |
|
160 | |
161 |
|
162 |
|
163 |
|
164 |
|
165 | focusableElements?: string;
|
166 |
|
167 | |
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 | uniqueNavElements?: boolean;
|
175 |
|
176 | |
177 |
|
178 |
|
179 |
|
180 |
|
181 | effect?: 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip' | 'creative' | 'cards';
|
182 |
|
183 | |
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 | runCallbacksOnInit?: boolean;
|
190 |
|
191 | |
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 | watchOverflow?: boolean;
|
198 |
|
199 | |
200 |
|
201 |
|
202 |
|
203 |
|
204 | userAgent?: string | null;
|
205 |
|
206 | |
207 |
|
208 |
|
209 |
|
210 |
|
211 | url?: string | null;
|
212 |
|
213 | |
214 |
|
215 |
|
216 | on?: {
|
217 | [event in keyof SwiperEvents]?: SwiperEvents[event];
|
218 | };
|
219 |
|
220 | |
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 | onAny?(handler: (eventName: string, ...args: any[]) => void): void;
|
234 |
|
235 | /**
|
236 | * When enabled it will use modern CSS Scroll Snap API.
|
237 | * It doesn't support all of Swiper's features, but potentially should bring a much better performance in simple configurations.
|
238 | *
|
239 | * This is what is not supported when it is enabled:
|
240 | *
|
241 | * - Cube and Cards effects
|
242 | * - `speed` parameter may not have no effect
|
243 | * - All transition start/end related events (use `slideChange` instead)
|
244 | * - `slidesPerGroup` has limited support
|
245 | * - `simulateTouch` doesn't have effect and "dragging" with mouse doesn't work
|
246 | * - `resistance` doesn't have any effect
|
247 | * - `allowSlidePrev/Next`
|
248 | * - `swipeHandler`
|
249 | * - `freeMode` and all relevant features
|
250 | *
|
251 | * @default false
|
252 | */
|
253 | cssMode?: boolean;
|
254 |
|
255 | // Slides grid
|
256 |
|
257 | /**
|
258 | * Distance between slides in px.
|
259 | *
|
260 | * @default 0
|
261 | *
|
262 | * @note If you use "margin" css property to the elements which go into Swiper in which you pass "spaceBetween" into, navigation might not work properly.
|
263 | */
|
264 | spaceBetween?: number;
|
265 |
|
266 | /**
|
267 | * Number of slides per view (slides visible at the same time on slider's container).
|
268 | * @note If you use it with "auto" value and along with `loop: true` then you need to specify `loopedSlides` parameter with amount of slides to loop (duplicate)
|
269 | * @note `slidesPerView: 'auto'` is currently not compatible with multirow mode, when `grid.rows` > 1
|
270 | *
|
271 | * @default 1
|
272 | */
|
273 | slidesPerView?: number | 'auto';
|
274 |
|
275 | /**
|
276 | * If total number of slides less than specified here value, then Swiper will enable `backface-visibility: hidden` on slide elements to reduce visual "flicker" in Safari.
|
277 | *
|
278 | * @note It is not recommended to enable it on large amount of slides as it will reduce performance
|
279 | *
|
280 | * @default 10
|
281 | */
|
282 | maxBackfaceHiddenSlides?: number;
|
283 |
|
284 | /**
|
285 | * Set numbers of slides to define and enable group sliding. Useful to use with slidesPerView > 1
|
286 | *
|
287 | * @default 1
|
288 | */
|
289 | slidesPerGroup?: number;
|
290 |
|
291 | /**
|
292 | * The parameter works in the following way: If `slidesPerGroupSkip` equals `0` (default), no slides are excluded from grouping, and the resulting behaviour is the same as without this change.
|
293 | *
|
294 | * If `slidesPerGroupSkip` is equal or greater than `1` the first X slides are treated as single groups, whereas all following slides are grouped by the `slidesPerGroup` value.
|
295 | *
|
296 | * @default 0
|
297 | */
|
298 | slidesPerGroupSkip?: number;
|
299 |
|
300 | /**
|
301 | * This param intended to be used only with `slidesPerView: 'auto'` and `slidesPerGroup: 1`. When enabled, it will skip all slides in view on `.slideNext()` & `.slidePrev()` methods calls, on Navigation "buttons" clicks and in autoplay.
|
302 | *
|
303 | * @default false
|
304 | */
|
305 | slidesPerGroupAuto?: boolean;
|
306 |
|
307 | /**
|
308 | * If `true`, then active slide will be centered, not always on the left side.
|
309 | *
|
310 | * @default false
|
311 | */
|
312 | centeredSlides?: boolean;
|
313 |
|
314 | /**
|
315 | * If `true`, then active slide will be centered without adding gaps at the beginning and end of slider.
|
316 | * Required `centeredSlides: true`. Not intended to be used with `loop` or `pagination`
|
317 | *
|
318 | * @default false
|
319 | */
|
320 | centeredSlidesBounds?: boolean;
|
321 |
|
322 | /**
|
323 | * Add (in px) additional slide offset in the beginning of the container (before all slides)
|
324 | *
|
325 | * @default 0
|
326 | */
|
327 | slidesOffsetBefore?: number;
|
328 |
|
329 | /**
|
330 | * Add (in px) additional slide offset in the end of the container (after all slides)
|
331 | *
|
332 | * @default 0
|
333 | */
|
334 | slidesOffsetAfter?: number;
|
335 |
|
336 | /**
|
337 | * Normalize slide index.
|
338 | *
|
339 | * @default true
|
340 | */
|
341 | normalizeSlideIndex?: boolean;
|
342 |
|
343 | /**
|
344 | * When enabled it center slides if the amount of slides less than `slidesPerView`. Not intended to be used `loop` mode and `grid.rows`
|
345 | *
|
346 | * @default false
|
347 | */
|
348 | centerInsufficientSlides?: boolean;
|
349 |
|
350 | /**
|
351 | * This option may a little improve desktop usability. If `true`, user will see the "grab" cursor when hover on Swiper
|
352 | *
|
353 | * @default false
|
354 | */
|
355 | grabCursor?: boolean;
|
356 |
|
357 | /**
|
358 | * Target element to listen touch events on. Can be `'container'` (to listen for touch events on swiper) or `'wrapper'`
|
359 | * (to listen for touch events on swiper-wrapper)
|
360 | *
|
361 | * @default 'wrapper'
|
362 | */
|
363 | touchEventsTarget?: 'container' | 'wrapper';
|
364 |
|
365 | /**
|
366 | * Touch ratio
|
367 | *
|
368 | * @default 1
|
369 | */
|
370 | touchRatio?: number;
|
371 |
|
372 | /**
|
373 | * Allowable angle (in degrees) to trigger touch move
|
374 | *
|
375 | * @default 45
|
376 | */
|
377 | touchAngle?: number;
|
378 |
|
379 | /**
|
380 | * If `true`, Swiper will accept mouse events like touch events (click and drag to change slides)
|
381 | *
|
382 | * @default true
|
383 | */
|
384 | simulateTouch?: boolean;
|
385 |
|
386 | /**
|
387 | * Set to `false` if you want to disable short swipes
|
388 | *
|
389 | * @default true
|
390 | */
|
391 | shortSwipes?: boolean;
|
392 |
|
393 | /**
|
394 | * Set to `false` if you want to disable long swipes
|
395 | *
|
396 | * @default true
|
397 | */
|
398 | longSwipes?: boolean;
|
399 |
|
400 | /**
|
401 | * Ratio to trigger swipe to next/previous slide during long swipes
|
402 | *
|
403 | * @default 0.5
|
404 | */
|
405 | longSwipesRatio?: number;
|
406 |
|
407 | /**
|
408 | * Minimal duration (in ms) to trigger swipe to next/previous slide during long swipes
|
409 | *
|
410 | * @default 300
|
411 | */
|
412 | longSwipesMs?: number;
|
413 |
|
414 | /**
|
415 | * If disabled, then slider will be animated only when you release it, it will not move while you hold your finger on it
|
416 | *
|
417 | * @default true
|
418 | */
|
419 | followFinger?: boolean;
|
420 |
|
421 | /**
|
422 | * If `false`, then the only way to switch the slide is use of external API functions like slidePrev or slideNext
|
423 | *
|
424 | * @default true
|
425 | */
|
426 | allowTouchMove?: boolean;
|
427 |
|
428 | /**
|
429 | * Threshold value in px. If "touch distance" will be lower than this value then swiper will not move
|
430 | *
|
431 | * @default 0
|
432 | */
|
433 | threshold?: number;
|
434 |
|
435 | /**
|
436 | * If disabled, `touchstart` (`pointerdown`) event won't be prevented
|
437 | *
|
438 | * @default true
|
439 | */
|
440 | touchStartPreventDefault?: boolean;
|
441 |
|
442 | /**
|
443 | * Force to always prevent default for `touchstart` (`pointerdown`) event
|
444 | *
|
445 | * @default false
|
446 | */
|
447 | touchStartForcePreventDefault?: boolean;
|
448 |
|
449 | /**
|
450 | * If enabled, then propagation of "touchmove" will be stopped
|
451 | *
|
452 | * @default false
|
453 | */
|
454 | touchMoveStopPropagation?: boolean;
|
455 |
|
456 | /**
|
457 | * Enable to release Swiper events for swipe-back work in app. If set to `'prevent'` then it will prevent system swipe-back navigation instead
|
458 | *
|
459 | * @default false
|
460 | */
|
461 | edgeSwipeDetection?: boolean | string;
|
462 |
|
463 | /**
|
464 | * Area (in px) from left edge of the screen to release touch events for swipe-back in app
|
465 | *
|
466 | * @default 20
|
467 | */
|
468 | edgeSwipeThreshold?: number;
|
469 |
|
470 | /**
|
471 | * Enable to release touch events on slider edge position (beginning, end) to allow for further page scrolling
|
472 | *
|
473 | * @default false
|
474 | */
|
475 | touchReleaseOnEdges?: boolean;
|
476 |
|
477 | /**
|
478 | * Passive event listeners will be used by default where possible to improve scrolling performance on mobile devices.
|
479 | * But if you need to use `e.preventDefault` and you have conflict with it, then you should disable this parameter
|
480 | *
|
481 | * @default true
|
482 | */
|
483 | passiveListeners?: boolean;
|
484 |
|
485 | // Touch Resistance
|
486 |
|
487 | /**
|
488 | * Set to `false` if you want to disable resistant bounds
|
489 | *
|
490 | * @default true
|
491 | */
|
492 | resistance?: boolean;
|
493 |
|
494 | /**
|
495 | * This option allows you to control resistance ratio
|
496 | *
|
497 | * @default 0.85
|
498 | */
|
499 | resistanceRatio?: number;
|
500 |
|
501 | // Swiping / No swiping
|
502 | /**
|
503 | * When enabled it won't allow to change slides by swiping or navigation/pagination buttons during transition
|
504 | *
|
505 | * @default false
|
506 | */
|
507 | preventInteractionOnTransition?: boolean;
|
508 |
|
509 | /**
|
510 | * Set to `false` to disable swiping to previous slide direction (to left or top)
|
511 | *
|
512 | * @default true
|
513 | */
|
514 | allowSlidePrev?: boolean;
|
515 |
|
516 | /**
|
517 | * Set to `false` to disable swiping to next slide direction (to right or bottom)
|
518 | *
|
519 | * @default true
|
520 | */
|
521 | allowSlideNext?: boolean;
|
522 |
|
523 | /**
|
524 | * Enable/disable swiping on elements matched to class specified in `noSwipingClass`
|
525 | *
|
526 | * @default true
|
527 | */
|
528 | noSwiping?: boolean;
|
529 |
|
530 | /**
|
531 | * Specify `noSwiping`'s element css class
|
532 | *
|
533 | * @default 'swiper-no-swiping'
|
534 | */
|
535 | noSwipingClass?: string;
|
536 |
|
537 | /**
|
538 | * Can be used instead of `noSwipingClass` to specify elements to disable swiping on.
|
539 | * For example `'input'` will disable swiping on all inputs
|
540 | *
|
541 | * @default
|
542 | */
|
543 | noSwipingSelector?: string;
|
544 |
|
545 | /**
|
546 | * String with CSS selector or HTML element of the container with pagination that will work as only available handler for swiping
|
547 | *
|
548 | * @default null
|
549 | */
|
550 | swipeHandler?: CSSSelector | HTMLElement | null;
|
551 |
|
552 | // Clicks
|
553 | /**
|
554 | * Set to `true` to prevent accidental unwanted clicks on links during swiping
|
555 | *
|
556 | * @default true
|
557 | */
|
558 | preventClicks?: boolean;
|
559 |
|
560 | /**
|
561 | * Set to `true` to stop clicks event propagation on links during swiping
|
562 | *
|
563 | * @default true
|
564 | */
|
565 | preventClicksPropagation?: boolean;
|
566 |
|
567 | /**
|
568 | * Set to `true` and click on any slide will produce transition to this slide
|
569 | *
|
570 | * @default false
|
571 | */
|
572 | slideToClickedSlide?: boolean;
|
573 |
|
574 | // Progress
|
575 | /**
|
576 | * Enable this feature to calculate each slides progress and visibility (slides in viewport will have additional visible class)
|
577 | *
|
578 | * @default false
|
579 | */
|
580 | watchSlidesProgress?: boolean;
|
581 |
|
582 | // Images
|
583 | /**
|
584 | * When enabled Swiper will force to load all images
|
585 | *
|
586 | * @default true
|
587 | */
|
588 | preloadImages?: boolean;
|
589 |
|
590 | /**
|
591 | * When enabled Swiper will be reinitialized after all inner images (<img> tags) are loaded. Required `preloadImages: true`
|
592 | *
|
593 | * @default true
|
594 | */
|
595 | updateOnImagesReady?: boolean;
|
596 |
|
597 | /**
|
598 | * Set to `true` to enable continuous loop mode
|
599 | *
|
600 | * Because of nature of how the loop mode works, it will add duplicated slides. Such duplicated slides will have additional classes:
|
601 | * - `swiper-slide-duplicate` - represents duplicated slide
|
602 | * - `swiper-slide-duplicate-active` - represents slide duplicated to the currently active slide
|
603 | * - `swiper-slide-duplicate-next` - represents slide duplicated to the slide next to active
|
604 | * - `swiper-slide-duplicate-prev` - represents slide duplicated to the slide previous to active
|
605 | *
|
606 | * @default false
|
607 | *
|
608 | * @note If you use it along with `slidesPerView: 'auto'` then you need to specify `loopedSlides` parameter with amount of slides to loop (duplicate). Should not be used together with `rewind` mode
|
609 | */
|
610 | loop?: boolean;
|
611 |
|
612 | /**
|
613 | * Set to `true` to enable "rewind" mode. When enabled, clicking "next" navigation button (or calling `.slideNext()`) when on last slide will slide back to the first slide. Clicking "prev" navigation button (or calling `.slidePrev()`) when on first slide will slide forward to the last slide.
|
614 | *
|
615 | * @default false
|
616 | *
|
617 | * @note Should not be used together with `loop` mode
|
618 | */
|
619 | rewind?: boolean;
|
620 |
|
621 | /**
|
622 | * Addition number of slides that will be cloned after creating of loop
|
623 | *
|
624 | * @default 0
|
625 | */
|
626 | loopAdditionalSlides?: number;
|
627 |
|
628 | /**
|
629 | * If you use `slidesPerView:'auto'` with loop mode you should tell to Swiper how many slides it should loop (duplicate) using this parameter
|
630 | *
|
631 | * @default null
|
632 | */
|
633 | loopedSlides?: number | null;
|
634 |
|
635 | /**
|
636 | * When enabled then amount of duplicated slides will not exceed amount of original slides. Useful to disable and increase `loopedSlides` when you have a lot of slides per view and not sufficient amount of original slides
|
637 | *
|
638 | * @default true
|
639 | */
|
640 | loopedSlidesLimit?: boolean;
|
641 |
|
642 | /**
|
643 | * Enable and loop mode will fill groups with insufficient number of slides with blank slides. Good to be used with `slidesPerGroup` parameter
|
644 | *
|
645 | * @default false
|
646 | */
|
647 | loopFillGroupWithBlank?: boolean;
|
648 | /**
|
649 | * When enabled it prevents Swiper slide prev/next transitions when transitions is already in progress (has effect when `loop` enabled)
|
650 | *
|
651 | * @default true
|
652 | */
|
653 | loopPreventsSlide?: boolean;
|
654 |
|
655 | /**
|
656 | * Allows to set different parameter for different responsive breakpoints (screen sizes). Not all parameters can be changed in breakpoints, only those which do not require different layout and logic, like `slidesPerView`, `slidesPerGroup`, `spaceBetween`, `grid.rows`. Such parameters like `loop` and `effect` won't work
|
657 | *
|
658 | * @example
|
659 | * ```js
|
660 | * const swiper = new Swiper('.swiper', {
|
661 | *
|
662 | * slidesPerView: 1,
|
663 | * spaceBetween: 10,
|
664 | *
|
665 | * breakpoints: {
|
666 | *
|
667 | * 320: {
|
668 | * slidesPerView: 2,
|
669 | * spaceBetween: 20
|
670 | * },
|
671 | *
|
672 | * 480: {
|
673 | * slidesPerView: 3,
|
674 | * spaceBetween: 30
|
675 | * },
|
676 | *
|
677 | * 640: {
|
678 | * slidesPerView: 4,
|
679 | * spaceBetween: 40
|
680 | * }
|
681 | * }
|
682 | * })
|
683 | * ```
|
684 | *
|
685 | * @example
|
686 | * ```js
|
687 | * const swiper = new Swiper('.swiper', {
|
688 | * slidesPerView: 1,
|
689 | * spaceBetween: 10,
|
690 | *
|
691 | * breakpoints: {
|
692 | * '@0.75': {
|
693 | * slidesPerView: 2,
|
694 | * spaceBetween: 20,
|
695 | * },
|
696 | * '@1.00': {
|
697 | * slidesPerView: 3,
|
698 | * spaceBetween: 40,
|
699 | * },
|
700 | * '@1.50': {
|
701 | * slidesPerView: 4,
|
702 | * spaceBetween: 50,
|
703 | * },
|
704 | * }
|
705 | * });
|
706 | * ```
|
707 | */
|
708 | breakpoints?: {
|
709 | [width: number]: SwiperOptions;
|
710 | [ratio: string]: SwiperOptions;
|
711 | };
|
712 |
|
713 | /**
|
714 | * Base for breakpoints (beta). Can be `window` or `container`. If set to `window` (by default) then breakpoint keys mean window width. If set to `container` then breakpoint keys treated as swiper container width
|
715 | *
|
716 | * @default 'window'
|
717 | *
|
718 | * @note Currently in beta and not supported by Swiper Angular, React, Svelte and Vue components
|
719 | */
|
720 | breakpointsBase?: string;
|
721 |
|
722 | // Observer
|
723 | /**
|
724 | * Set to `true` to enable Mutation Observer on Swiper and its elements. In this case Swiper will be updated (reinitialized) each time if you change its style (like hide/show) or modify its child elements (like adding/removing slides)
|
725 | *
|
726 | * @default false
|
727 | */
|
728 | observer?: boolean;
|
729 | /**
|
730 | * Set to `true` if you also need to watch Mutations for Swiper slide children elements
|
731 | *
|
732 | * @default false
|
733 | */
|
734 | observeSlideChildren?: boolean;
|
735 | /**
|
736 | * Set to `true` if you also need to watch Mutations for Swiper parent elements
|
737 | *
|
738 | * @default false
|
739 | */
|
740 | observeParents?: boolean;
|
741 |
|
742 | // Namespace
|
743 | /**
|
744 | * The beginning of the modifier CSS class that can be added to swiper container depending on different parameters
|
745 | *
|
746 | * @default 'swiper-'
|
747 | */
|
748 | containerModifierClass?: string;
|
749 |
|
750 | /**
|
751 | * CSS class name of slide
|
752 | *
|
753 | * @default 'swiper-slide'
|
754 | *
|
755 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
756 | *
|
757 | * @note Not supported in Swiper Angular/React/Svelte/Vue components
|
758 | */
|
759 | slideClass?: string;
|
760 |
|
761 | /**
|
762 | * CSS class name of currently active slide
|
763 | *
|
764 | * @default 'swiper-slide-active'
|
765 | *
|
766 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
767 | *
|
768 | * @note Not supported in Swiper Angular/React/Svelte/Vue components
|
769 | */
|
770 | slideActiveClass?: string;
|
771 |
|
772 | /**
|
773 | * CSS class name of duplicated slide which represents the currently active slide
|
774 | *
|
775 | * @default 'swiper-slide-duplicate-active'
|
776 | *
|
777 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
778 | *
|
779 | * @note Not supported in Swiper Angular/React/Svelte/Vue components
|
780 | */
|
781 | slideDuplicateActiveClass?: string;
|
782 |
|
783 | /**
|
784 | * CSS class name of currently visible slide
|
785 | *
|
786 | * @default 'swiper-slide-visible'
|
787 | *
|
788 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
789 | *
|
790 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
791 | */
|
792 | slideVisibleClass?: string;
|
793 |
|
794 | /**
|
795 | * CSS class name of slide duplicated by loop mode
|
796 | *
|
797 | * @default 'swiper-slide-duplicate'
|
798 | *
|
799 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
800 | *
|
801 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
802 | */
|
803 | slideDuplicateClass?: string;
|
804 |
|
805 | /**
|
806 | * CSS class name of slide which is right after currently active slide
|
807 | *
|
808 | * @default 'swiper-slide-next'
|
809 | *
|
810 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
811 | *
|
812 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
813 | */
|
814 | slideNextClass?: string;
|
815 |
|
816 | /**
|
817 | * CSS class name of duplicated slide which represents the slide next to active slide
|
818 | *
|
819 | * @default 'swiper-slide-duplicate-next'
|
820 | *
|
821 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
822 | *
|
823 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
824 | */
|
825 | slideDuplicateNextClass?: string;
|
826 |
|
827 | /**
|
828 | * CSS class name of slide which is right before currently active slide
|
829 | *
|
830 | * @default 'swiper-slide-prev'
|
831 | *
|
832 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
833 | *
|
834 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
835 | */
|
836 | slidePrevClass?: string;
|
837 |
|
838 | /**
|
839 | * CSS class name of duplicated slide which represents the slide previous to active slide
|
840 | *
|
841 | * @default 'swiper-slide-duplicate-prev'
|
842 | *
|
843 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
844 | *
|
845 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
846 | */
|
847 | slideDuplicatePrevClass?: string;
|
848 |
|
849 | /**
|
850 | * CSS class name of blank slide append to fill groups in loop mode when `loopFillGroupWithBlank` is also enabled
|
851 | *
|
852 | * @default 'swiper-slide-invisible-blank'
|
853 | *
|
854 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
855 | *
|
856 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
857 | */
|
858 | slideBlankClass?: string;
|
859 |
|
860 | /**
|
861 | * CSS class name of slides' wrapper
|
862 | *
|
863 | * @default 'swiper-wrapper'
|
864 | *
|
865 | * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
|
866 | *
|
867 | * @note Not supported in Swiper Angular/React/Svelte/Vue
|
868 | *
|
869 | */
|
870 | wrapperClass?: string;
|
871 |
|
872 | /**
|
873 | * Object with a11y parameters or boolean `true` to enable with default settings.
|
874 | *
|
875 | * @example
|
876 | * ```js
|
877 | * const swiper = new Swiper('.swiper', {
|
878 | * a11y: {
|
879 | * prevSlideMessage: 'Previous slide',
|
880 | * nextSlideMessage: 'Next slide',
|
881 | * },
|
882 | * });
|
883 | * ```
|
884 | */
|
885 | a11y?: A11yOptions;
|
886 |
|
887 | /**
|
888 | * Object with autoplay parameters or boolean `true` to enable with default settings
|
889 | *
|
890 | * @example
|
891 | * ```js
|
892 | * const swiper = new Swiper('.swiper', {
|
893 | * autoplay: {
|
894 | * delay: 5000,
|
895 | * },
|
896 | *});
|
897 | * ```
|
898 | */
|
899 | autoplay?: AutoplayOptions | boolean;
|
900 |
|
901 | /**
|
902 | * Object with controller parameters or boolean `true` to enable with default settings
|
903 | *
|
904 | * @example
|
905 | * ```js
|
906 | * const swiper = new Swiper('.swiper', {
|
907 | * controller: {
|
908 | * inverse: true,
|
909 | * },
|
910 | * });
|
911 | * ```
|
912 | */
|
913 | controller?: ControllerOptions;
|
914 |
|
915 | /**
|
916 | * Object with Coverflow-effect parameters.
|
917 | *
|
918 | * @example
|
919 | * ```js
|
920 | * const swiper = new Swiper('.swiper', {
|
921 | * effect: 'coverflow',
|
922 | * coverflowEffect: {
|
923 | * rotate: 30,
|
924 | * slideShadows: false,
|
925 | * },
|
926 | * });
|
927 | * ```
|
928 | */
|
929 | coverflowEffect?: CoverflowEffectOptions;
|
930 |
|
931 | /**
|
932 | * Object with Cube-effect parameters
|
933 | *
|
934 | * @example
|
935 | * ```js
|
936 | * const swiper = new Swiper('.swiper', {
|
937 | * effect: 'cube',
|
938 | * cubeEffect: {
|
939 | * slideShadows: false,
|
940 | * },
|
941 | * });
|
942 | * ```
|
943 | */
|
944 | cubeEffect?: CubeEffectOptions;
|
945 |
|
946 | /**
|
947 | * Object with Fade-effect parameters
|
948 | *
|
949 | * @example
|
950 | * ```js
|
951 | * const swiper = new Swiper('.swiper', {
|
952 | * effect: 'fade',
|
953 | * fadeEffect: {
|
954 | * crossFade: true
|
955 | * },
|
956 | * });
|
957 | * ```
|
958 | */
|
959 | fadeEffect?: FadeEffectOptions;
|
960 |
|
961 | /**
|
962 | * Object with Flip-effect parameters
|
963 | *
|
964 | * @example
|
965 | * ```js
|
966 | * const swiper = new Swiper('.swiper', {
|
967 | * effect: 'flip',
|
968 | * flipEffect: {
|
969 | * slideShadows: false,
|
970 | * },
|
971 | * });
|
972 | * ```
|
973 | */
|
974 | flipEffect?: FlipEffectOptions;
|
975 |
|
976 | /**
|
977 | * Object with Creative-effect parameters
|
978 | *
|
979 | * @example
|
980 | * ```js
|
981 | * const swiper = new Swiper('.swiper', {
|
982 | * effect: 'creative',
|
983 | * creativeEffect: {
|
984 | * prev: {
|
985 | *
|
986 | * translate: [0, 0, -400],
|
987 | * },
|
988 | * next: {
|
989 | *
|
990 | * translate: ['100%', 0, 0],
|
991 | * },
|
992 | * },
|
993 | * });
|
994 | * ```
|
995 | */
|
996 | creativeEffect?: CreativeEffectOptions;
|
997 |
|
998 | /**
|
999 | * Object with Cards-effect parameters
|
1000 | *
|
1001 | * @example
|
1002 | * ```js
|
1003 | * const swiper = new Swiper('.swiper', {
|
1004 | * effect: 'cards',
|
1005 | * cardsEffect: {
|
1006 | *
|
1007 | * },
|
1008 | * });
|
1009 | * ```
|
1010 | */
|
1011 | cardsEffect?: CardsEffectOptions;
|
1012 |
|
1013 | /**
|
1014 | * Enables hash url navigation to for slides.
|
1015 | * Object with hash navigation parameters or boolean `true` to enable with default settings
|
1016 | *
|
1017 | * @example
|
1018 | * ```js
|
1019 | * const swiper = new Swiper('.swiper', {
|
1020 | * hashNavigation: {
|
1021 | * replaceState: true,
|
1022 | * },
|
1023 | * });
|
1024 | * ```
|
1025 | */
|
1026 | hashNavigation?: HashNavigationOptions | boolean;
|
1027 |
|
1028 | /**
|
1029 | * Enables history push state where every slide will have its own url. In this parameter you have to specify main slides url like `"slides"` and specify every slide url using `data-history` attribute.
|
1030 | *
|
1031 | * Object with history navigation parameters or boolean `true` to enable with default settings
|
1032 | *
|
1033 | * @example
|
1034 | * ```js
|
1035 | * const swiper = new Swiper('.swiper', {
|
1036 | * history: {
|
1037 | * replaceState: true,
|
1038 | * },
|
1039 | * });
|
1040 | * ```
|
1041 | *
|
1042 | * @example
|
1043 | * ```html
|
1044 | * <!-- will produce "slides/slide1" url in browser history -->
|
1045 | * <div class="swiper-slide" data-history="slide1"></div>
|
1046 | * ```
|
1047 | */
|
1048 | history?: HistoryOptions | boolean;
|
1049 |
|
1050 | /**
|
1051 | * Enables navigation through slides using keyboard. Object with keyboard parameters or boolean `true` to enable with default settings
|
1052 | *
|
1053 | * @example
|
1054 | * ```js
|
1055 | * const swiper = new Swiper('.swiper', {
|
1056 | * keyboard: {
|
1057 | * enabled: true,
|
1058 | * onlyInViewport: false,
|
1059 | * },
|
1060 | * });
|
1061 | * ```
|
1062 | */
|
1063 | keyboard?: KeyboardOptions | boolean;
|
1064 |
|
1065 | /**
|
1066 | * Enables images lazy loading. Object with lazy loading parameters or boolean `true` to enable with default settings
|
1067 | *
|
1068 | * @example
|
1069 | * ```js
|
1070 | * const swiper = new Swiper('.swiper', {
|
1071 | * lazy: {
|
1072 | * loadPrevNext: true,
|
1073 | * },
|
1074 | * });
|
1075 | * ```
|
1076 | */
|
1077 | lazy?: LazyOptions | boolean;
|
1078 |
|
1079 | /**
|
1080 | * Enables navigation through slides using mouse wheel. Object with mousewheel parameters or boolean `true` to enable with default settings
|
1081 | *
|
1082 | * @example
|
1083 | * ```js
|
1084 | * const swiper = new Swiper('.swiper', {
|
1085 | * mousewheel: {
|
1086 | * invert: true,
|
1087 | * },
|
1088 | * });
|
1089 | * ```
|
1090 | */
|
1091 | mousewheel?: MousewheelOptions | boolean;
|
1092 |
|
1093 | /**
|
1094 | * Object with navigation parameters or boolean `true` to enable with default settings.
|
1095 | *
|
1096 | * @example
|
1097 | * ```js
|
1098 | * const swiper = new Swiper('.swiper', {
|
1099 | * navigation: {
|
1100 | * nextEl: '.swiper-button-next',
|
1101 | * prevEl: '.swiper-button-prev',
|
1102 | * },
|
1103 | * });
|
1104 | * ```
|
1105 | */
|
1106 | navigation?: NavigationOptions | boolean;
|
1107 |
|
1108 | /**
|
1109 | * Object with pagination parameters or boolean `true` to enable with default settings.
|
1110 | *
|
1111 | * @example
|
1112 | * ```js
|
1113 | * const swiper = new Swiper('.swiper', {
|
1114 | * pagination: {
|
1115 | * el: '.swiper-pagination',
|
1116 | * type: 'bullets',
|
1117 | * },
|
1118 | * });
|
1119 | * ```
|
1120 | */
|
1121 | pagination?: PaginationOptions | boolean;
|
1122 |
|
1123 | /**
|
1124 | * Object with parallax parameters or boolean `true` to enable with default settings.
|
1125 | *
|
1126 | * @example
|
1127 | * ```js
|
1128 | * const swiper = new Swiper('.swiper', {
|
1129 | * parallax: true,
|
1130 | * });
|
1131 | * ```
|
1132 | */
|
1133 | parallax?: ParallaxOptions | boolean;
|
1134 |
|
1135 | /**
|
1136 | * Object with scrollbar parameters or boolean `true` to enable with default settings.
|
1137 | *
|
1138 | * @example
|
1139 | * ```js
|
1140 | * const swiper = new Swiper('.swiper', {
|
1141 | * scrollbar: {
|
1142 | * el: '.swiper-scrollbar',
|
1143 | * draggable: true,
|
1144 | * },
|
1145 | * });
|
1146 | * ```
|
1147 | */
|
1148 | scrollbar?: ScrollbarOptions | boolean;
|
1149 |
|
1150 | /**
|
1151 | * Object with thumbs component parameters
|
1152 | *
|
1153 | * @example
|
1154 | * ```js
|
1155 | * const swiper = new Swiper('.swiper', {
|
1156 | * ...
|
1157 | * thumbs: {
|
1158 | * swiper: thumbsSwiper
|
1159 | * }
|
1160 | * });
|
1161 | * ```
|
1162 | */
|
1163 | thumbs?: ThumbsOptions;
|
1164 |
|
1165 | /**
|
1166 | * Enables virtual slides functionality. Object with virtual slides parameters or boolean `true` to enable with default settings.
|
1167 | *
|
1168 | * @example
|
1169 | * ```js
|
1170 | * const swiper = new Swiper('.swiper', {
|
1171 | * virtual: {
|
1172 | * slides: ['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4', 'Slide 5'],
|
1173 | * },
|
1174 | * });
|
1175 | * ```
|
1176 | */
|
1177 | virtual?: VirtualOptions | boolean;
|
1178 |
|
1179 | /**
|
1180 | * Enables zooming functionality. Object with zoom parameters or boolean `true` to enable with default settings
|
1181 | *
|
1182 | * @example
|
1183 | * ```js
|
1184 | * const swiper = new Swiper('.swiper', {
|
1185 | * zoom: {
|
1186 | * maxRatio: 5,
|
1187 | * },
|
1188 | * });
|
1189 | * ```
|
1190 | */
|
1191 | zoom?: ZoomOptions | boolean;
|
1192 |
|
1193 | /**
|
1194 | * Enables free mode functionality. Object with free mode parameters or boolean `true` to enable with default settings.
|
1195 | *
|
1196 | * @example
|
1197 | * ```js
|
1198 | * const swiper = new Swiper('.swiper', {
|
1199 | * freeMode: true,
|
1200 | * });
|
1201 | *
|
1202 | * const swiper = new Swiper('.swiper', {
|
1203 | * freeMode: {
|
1204 | * enabled: true,
|
1205 | * sticky: true,
|
1206 | * },
|
1207 | * });
|
1208 | * ```
|
1209 | */
|
1210 | freeMode?: FreeModeOptions | boolean;
|
1211 |
|
1212 | /**
|
1213 | * Object with grid parameters to enable "multirow" slider.
|
1214 | *
|
1215 | * @example
|
1216 | * ```js
|
1217 | * const swiper = new Swiper('.swiper', {
|
1218 | * grid: {
|
1219 | * rows: 2,
|
1220 | * },
|
1221 | * });
|
1222 | * ```
|
1223 | */
|
1224 | grid?: GridOptions;
|
1225 |
|
1226 | /**
|
1227 | * !INTERNAL When enabled will emit "_containerClasses" and "_slideClass" events
|
1228 | */
|
1229 | _emitClasses?: boolean;
|
1230 | }
|
1231 |
|
\ | No newline at end of file |