UNPKG

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