UNPKG

32.4 kBTypeScriptView Raw
1import { A11yOptions } from './modules/a11y';
2import { AutoplayOptions } from './modules/autoplay';
3import { ControllerOptions } from './modules/controller';
4import { CoverflowEffectOptions } from './modules/effect-coverflow';
5import { CubeEffectOptions } from './modules/effect-cube';
6import { FadeEffectOptions } from './modules/effect-fade';
7import { FlipEffectOptions } from './modules/effect-flip';
8import { CreativeEffectOptions } from './modules/effect-creative';
9import { CardsEffectOptions } from './modules/effect-cards';
10import { HashNavigationOptions } from './modules/hash-navigation';
11import { HistoryOptions } from './modules/history';
12import { KeyboardOptions } from './modules/keyboard';
13import { LazyOptions } from './modules/lazy';
14import { MousewheelOptions } from './modules/mousewheel';
15import { NavigationOptions } from './modules/navigation';
16import { PaginationOptions } from './modules/pagination';
17import { ParallaxOptions } from './modules/parallax';
18import { ScrollbarOptions } from './modules/scrollbar';
19import { ThumbsOptions } from './modules/thumbs';
20import { VirtualOptions } from './modules/virtual';
21import { ZoomOptions } from './modules/zoom';
22import { FreeModeOptions } from './modules/free-mode';
23import { GridOptions } from './modules/grid';
24
25import { CSSSelector, SwiperModule } from './shared';
26import { SwiperEvents } from './swiper-events';
27
28export interface SwiperOptions {
29 /**
30 * Array with Swiper modules
31 *
32 * @example
33 * ```js
34 * import Swiper, { Navigation, Pagination } from 'swiper';
35 *
36 * const swiper = new Swiper('.swiper', {
37 * modules: [ Navigation, Pagination ],
38 * });
39 * ```
40 */
41 modules?: SwiperModule[];
42 /**
43 * Whether Swiper should be initialised automatically when you create an instance.
44 * If disabled, then you need to init it manually by calling `swiper.init()`
45 *
46 * @default true
47 */
48 init?: boolean;
49
50 /**
51 * Whether Swiper initially enabled. When Swiper is disabled, it will hide all navigation elements and won't respond to any events and interactions
52 *
53 * @default true
54 */
55 enabled?: boolean;
56
57 /**
58 * Swiper will recalculate slides position on window resize (orientationchange)
59 *
60 * @default true
61 */
62 updateOnWindowResize?: boolean;
63
64 /**
65 * When enabled it will use ResizeObserver (if supported by browser) on swiper container to detect container resize (instead of watching for window resize)
66 *
67 * @default true
68 */
69 resizeObserver?: boolean;
70
71 /**
72 * Index number of initial slide.
73 *
74 * @default 0
75 */
76 initialSlide?: number;
77
78 /**
79 * Can be `'horizontal'` or `'vertical'` (for vertical slider).
80 *
81 * @default 'horizontal'
82 */
83 direction?: 'horizontal' | 'vertical';
84
85 /**
86 * Duration of transition between slides (in ms)
87 *
88 * @default 300
89 */
90 speed?: number;
91
92 /**
93 * Enabled this option and plugin will set width/height on swiper wrapper equal to total size of all slides.
94 * Mostly should be used as compatibility fallback option for browser that don't support flexbox layout well
95 *
96 * @default false
97 */
98 setWrapperSize?: boolean;
99
100 /**
101 * Enabled this option and swiper will be operated as usual except it will not move, real translate values on wrapper will not be set.
102 * Useful when you may need to create custom slide transition
103 *
104 * @default false
105 */
106 virtualTranslate?: boolean;
107
108 /**
109 * Swiper width (in px). Parameter allows to force Swiper width.
110 * Useful only if you initialize Swiper when it is hidden and in SSR and Test environments for correct Swiper initialization
111 *
112 * @default null
113 *
114 * @note Setting this parameter will make Swiper not responsive
115 */
116 width?: number | null;
117
118 /**
119 * Swiper height (in px). Parameter allows to force Swiper height.
120 * Useful only if you initialize Swiper when it is hidden and in SSR and Test environments for correct Swiper initialization
121 *
122 * @default null
123 *
124 * @note Setting this parameter will make Swiper not responsive
125 */
126 height?: number | null;
127
128 /**
129 * Set to `true` and slider wrapper will adapt its height to the height of the currently active slide
130 *
131 * @default false
132 */
133 autoHeight?: boolean;
134
135 /**
136 * Set to `true` to round values of slides width and height to prevent blurry texts on usual
137 * resolution screens (if you have such)
138 *
139 * @default false
140 */
141 roundLengths?: boolean;
142
143 /**
144 * Set to `true` on Swiper for correct touch events interception. Use only on
145 * swipers that use same direction as the parent one
146 *
147 * @default false
148 */
149 nested?: boolean;
150
151 /**
152 * When enabled Swiper will automatically wrap slides with swiper-wrapper element,
153 * and will create required elements for navigation, pagination and scrollbar
154 * they are enabled (with their respective params object or with boolean `true`))
155 *
156 * @default false
157 */
158 createElements?: boolean;
159
160 /**
161 * CSS selector for focusable elements. Swiping will be disabled on such elements if they are "focused"
162 *
163 * @default 'input, select, option, textarea, button, video, label'
164 */
165 focusableElements?: string;
166
167 /**
168 * If enabled (by default) and navigation elements' parameters passed as a string (like `".pagination"`)
169 * then Swiper will look for such elements through child elements first.
170 * Applies for pagination, prev/next buttons and scrollbar elements
171 *
172 * @default true
173 */
174 uniqueNavElements?: boolean;
175
176 /**
177 * Transition effect. Can be `'slide'`, `'fade'`, `'cube'`, `'coverflow'`, `'flip'` or `'creative'`
178 *
179 * @default 'slide'
180 */
181 effect?: 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip' | 'creative' | 'cards';
182
183 /**
184 * Fire Transition/SlideChange/Start/End events on swiper initialization.
185 * Such events will be fired on initialization in case of your initialSlide is not 0, or you use loop mode
186 *
187 * @default true
188 */
189 runCallbacksOnInit?: boolean;
190
191 /**
192 * When enabled Swiper will be disabled and hide navigation buttons on
193 * case there are not enough slides for sliding.
194 *
195 * @default true
196 */
197 watchOverflow?: boolean;
198
199 /**
200 * userAgent string. Required for browser/device detection when rendered on server-side
201 *
202 * @default null
203 */
204 userAgent?: string | null;
205
206 /**
207 * Required for active slide detection when rendered on server-side and enabled history
208 *
209 * @default null
210 */
211 url?: string | null;
212
213 /**
214 * Register event handlers
215 */
216 on?: {
217 [event in keyof SwiperEvents]?: SwiperEvents[event];
218 };
219
220 /**
221 * Add event listener that will be fired on all events
222 *
223 * @example
224 * ```js
225 * const swiper = new Swiper('.swiper', {
226 * onAny(eventName, ...args) {
227 * console.log('Event: ', eventName);
228 * console.log('Event data: ', args);
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 * Enable and loop mode will fill groups with insufficient number of slides with blank slides. Good to be used with `slidesPerGroup` parameter
637 *
638 * @default false
639 */
640 loopFillGroupWithBlank?: boolean;
641 /**
642 * When enabled it prevents Swiper slide prev/next transitions when transitions is already in progress (has effect when `loop` enabled)
643 *
644 * @default true
645 */
646 loopPreventsSlide?: boolean;
647
648 /**
649 * 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`, `grid.rows`. Such parameters like `loop` and `effect` won't work
650 *
651 * @example
652 * ```js
653 * const swiper = new Swiper('.swiper', {
654 * // Default parameters
655 * slidesPerView: 1,
656 * spaceBetween: 10,
657 * // Responsive breakpoints
658 * breakpoints: {
659 * // when window width is >= 320px
660 * 320: {
661 * slidesPerView: 2,
662 * spaceBetween: 20
663 * },
664 * // when window width is >= 480px
665 * 480: {
666 * slidesPerView: 3,
667 * spaceBetween: 30
668 * },
669 * // when window width is >= 640px
670 * 640: {
671 * slidesPerView: 4,
672 * spaceBetween: 40
673 * }
674 * }
675 * })
676 * ```
677 *
678 * @example
679 * ```js
680 * const swiper = new Swiper('.swiper', {
681 * slidesPerView: 1,
682 * spaceBetween: 10,
683 * // using "ratio" endpoints
684 * breakpoints: {
685 * '@0.75': {
686 * slidesPerView: 2,
687 * spaceBetween: 20,
688 * },
689 * '@1.00': {
690 * slidesPerView: 3,
691 * spaceBetween: 40,
692 * },
693 * '@1.50': {
694 * slidesPerView: 4,
695 * spaceBetween: 50,
696 * },
697 * }
698 * });
699 * ```
700 */
701 breakpoints?: {
702 [width: number]: SwiperOptions;
703 [ratio: string]: SwiperOptions;
704 };
705
706 /**
707 * 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
708 *
709 * @default 'window'
710 *
711 * @note Currently in beta and not supported by Swiper Angular, React, Svelte and Vue components
712 */
713 breakpointsBase?: string;
714
715 // Observer
716 /**
717 * 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)
718 *
719 * @default false
720 */
721 observer?: boolean;
722 /**
723 * Set to `true` if you also need to watch Mutations for Swiper slide children elements
724 *
725 * @default false
726 */
727 observeSlideChildren?: boolean;
728 /**
729 * Set to `true` if you also need to watch Mutations for Swiper parent elements
730 *
731 * @default false
732 */
733 observeParents?: boolean;
734
735 // Namespace
736 /**
737 * The beginning of the modifier CSS class that can be added to swiper container depending on different parameters
738 *
739 * @default 'swiper-'
740 */
741 containerModifierClass?: string;
742
743 /**
744 * CSS class name of slide
745 *
746 * @default 'swiper-slide'
747 *
748 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
749 *
750 * @note Not supported in Swiper Angular/React/Svelte/Vue components
751 */
752 slideClass?: string;
753
754 /**
755 * CSS class name of currently active slide
756 *
757 * @default 'swiper-slide-active'
758 *
759 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
760 *
761 * @note Not supported in Swiper Angular/React/Svelte/Vue components
762 */
763 slideActiveClass?: string;
764
765 /**
766 * CSS class name of duplicated slide which represents the currently active slide
767 *
768 * @default 'swiper-slide-duplicate-active'
769 *
770 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
771 *
772 * @note Not supported in Swiper Angular/React/Svelte/Vue components
773 */
774 slideDuplicateActiveClass?: string;
775
776 /**
777 * CSS class name of currently visible slide
778 *
779 * @default 'swiper-slide-visible'
780 *
781 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
782 *
783 * @note Not supported in Swiper Angular/React/Svelte/Vue
784 */
785 slideVisibleClass?: string;
786
787 /**
788 * CSS class name of slide duplicated by loop mode
789 *
790 * @default 'swiper-slide-duplicate'
791 *
792 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
793 *
794 * @note Not supported in Swiper Angular/React/Svelte/Vue
795 */
796 slideDuplicateClass?: string;
797
798 /**
799 * CSS class name of slide which is right after currently active slide
800 *
801 * @default 'swiper-slide-next'
802 *
803 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
804 *
805 * @note Not supported in Swiper Angular/React/Svelte/Vue
806 */
807 slideNextClass?: string;
808
809 /**
810 * CSS class name of duplicated slide which represents the slide next to active slide
811 *
812 * @default 'swiper-slide-duplicate-next'
813 *
814 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
815 *
816 * @note Not supported in Swiper Angular/React/Svelte/Vue
817 */
818 slideDuplicateNextClass?: string;
819
820 /**
821 * CSS class name of slide which is right before currently active slide
822 *
823 * @default 'swiper-slide-prev'
824 *
825 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
826 *
827 * @note Not supported in Swiper Angular/React/Svelte/Vue
828 */
829 slidePrevClass?: string;
830
831 /**
832 * CSS class name of duplicated slide which represents the slide previous to active slide
833 *
834 * @default 'swiper-slide-duplicate-prev'
835 *
836 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
837 *
838 * @note Not supported in Swiper Angular/React/Svelte/Vue
839 */
840 slideDuplicatePrevClass?: string;
841
842 /**
843 * CSS class name of blank slide append to fill groups in loop mode when `loopFillGroupWithBlank` is also enabled
844 *
845 * @default 'swiper-slide-invisible-blank'
846 *
847 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
848 *
849 * @note Not supported in Swiper Angular/React/Svelte/Vue
850 */
851 slideBlankClass?: string;
852
853 /**
854 * CSS class name of slides' wrapper
855 *
856 * @default 'swiper-wrapper'
857 *
858 * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
859 *
860 * @note Not supported in Swiper Angular/React/Svelte/Vue
861 *
862 */
863 wrapperClass?: string;
864
865 /**
866 * Object with a11y parameters or boolean `true` to enable with default settings.
867 *
868 * @example
869 * ```js
870 * const swiper = new Swiper('.swiper', {
871 * a11y: {
872 * prevSlideMessage: 'Previous slide',
873 * nextSlideMessage: 'Next slide',
874 * },
875 * });
876 * ```
877 */
878 a11y?: A11yOptions;
879
880 /**
881 * Object with autoplay parameters or boolean `true` to enable with default settings
882 *
883 * @example
884 * ```js
885 * const swiper = new Swiper('.swiper', {
886 * autoplay: {
887 * delay: 5000,
888 * },
889 *});
890 * ```
891 */
892 autoplay?: AutoplayOptions | boolean;
893
894 /**
895 * Object with controller parameters or boolean `true` to enable with default settings
896 *
897 * @example
898 * ```js
899 * const swiper = new Swiper('.swiper', {
900 * controller: {
901 * inverse: true,
902 * },
903 * });
904 * ```
905 */
906 controller?: ControllerOptions;
907
908 /**
909 * Object with Coverflow-effect parameters.
910 *
911 * @example
912 * ```js
913 * const swiper = new Swiper('.swiper', {
914 * effect: 'coverflow',
915 * coverflowEffect: {
916 * rotate: 30,
917 * slideShadows: false,
918 * },
919 * });
920 * ```
921 */
922 coverflowEffect?: CoverflowEffectOptions;
923
924 /**
925 * Object with Cube-effect parameters
926 *
927 * @example
928 * ```js
929 * const swiper = new Swiper('.swiper', {
930 * effect: 'cube',
931 * cubeEffect: {
932 * slideShadows: false,
933 * },
934 * });
935 * ```
936 */
937 cubeEffect?: CubeEffectOptions;
938
939 /**
940 * Object with Fade-effect parameters
941 *
942 * @example
943 * ```js
944 * const swiper = new Swiper('.swiper', {
945 * effect: 'fade',
946 * fadeEffect: {
947 * crossFade: true
948 * },
949 * });
950 * ```
951 */
952 fadeEffect?: FadeEffectOptions;
953
954 /**
955 * Object with Flip-effect parameters
956 *
957 * @example
958 * ```js
959 * const swiper = new Swiper('.swiper', {
960 * effect: 'flip',
961 * flipEffect: {
962 * slideShadows: false,
963 * },
964 * });
965 * ```
966 */
967 flipEffect?: FlipEffectOptions;
968
969 /**
970 * Object with Creative-effect parameters
971 *
972 * @example
973 * ```js
974 * const swiper = new Swiper('.swiper', {
975 * effect: 'creative',
976 * creativeEffect: {
977 * prev: {
978 * // will set `translateZ(-400px)` on previous slides
979 * translate: [0, 0, -400],
980 * },
981 * next: {
982 * // will set `translateX(100%)` on next slides
983 * translate: ['100%', 0, 0],
984 * },
985 * },
986 * });
987 * ```
988 */
989 creativeEffect?: CreativeEffectOptions;
990
991 /**
992 * Object with Cards-effect parameters
993 *
994 * @example
995 * ```js
996 * const swiper = new Swiper('.swiper', {
997 * effect: 'cards',
998 * cardsEffect: {
999 * // ...
1000 * },
1001 * });
1002 * ```
1003 */
1004 cardsEffect?: CardsEffectOptions;
1005
1006 /**
1007 * Enables hash url navigation to for slides.
1008 * Object with hash navigation parameters or boolean `true` to enable with default settings
1009 *
1010 * @example
1011 * ```js
1012 * const swiper = new Swiper('.swiper', {
1013 * hashNavigation: {
1014 * replaceState: true,
1015 * },
1016 * });
1017 * ```
1018 */
1019 hashNavigation?: HashNavigationOptions | boolean;
1020
1021 /**
1022 * 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.
1023 *
1024 * Object with history navigation parameters or boolean `true` to enable with default settings
1025 *
1026 * @example
1027 * ```js
1028 * const swiper = new Swiper('.swiper', {
1029 * history: {
1030 * replaceState: true,
1031 * },
1032 * });
1033 * ```
1034 *
1035 * @example
1036 * ```html
1037 * <!-- will produce "slides/slide1" url in browser history -->
1038 * <div class="swiper-slide" data-history="slide1"></div>
1039 * ```
1040 */
1041 history?: HistoryOptions | boolean;
1042
1043 /**
1044 * Enables navigation through slides using keyboard. Object with keyboard parameters or boolean `true` to enable with default settings
1045 *
1046 * @example
1047 * ```js
1048 * const swiper = new Swiper('.swiper', {
1049 * keyboard: {
1050 * enabled: true,
1051 * onlyInViewport: false,
1052 * },
1053 * });
1054 * ```
1055 */
1056 keyboard?: KeyboardOptions | boolean;
1057
1058 /**
1059 * Enables images lazy loading. Object with lazy loading parameters or boolean `true` to enable with default settings
1060 *
1061 * @example
1062 * ```js
1063 * const swiper = new Swiper('.swiper', {
1064 * lazy: {
1065 * loadPrevNext: true,
1066 * },
1067 * });
1068 * ```
1069 */
1070 lazy?: LazyOptions | boolean;
1071
1072 /**
1073 * Enables navigation through slides using mouse wheel. Object with mousewheel parameters or boolean `true` to enable with default settings
1074 *
1075 * @example
1076 * ```js
1077 * const swiper = new Swiper('.swiper', {
1078 * mousewheel: {
1079 * invert: true,
1080 * },
1081 * });
1082 * ```
1083 */
1084 mousewheel?: MousewheelOptions | boolean;
1085
1086 /**
1087 * Object with navigation parameters or boolean `true` to enable with default settings.
1088 *
1089 * @example
1090 * ```js
1091 * const swiper = new Swiper('.swiper', {
1092 * navigation: {
1093 * nextEl: '.swiper-button-next',
1094 * prevEl: '.swiper-button-prev',
1095 * },
1096 * });
1097 * ```
1098 */
1099 navigation?: NavigationOptions | boolean;
1100
1101 /**
1102 * Object with pagination parameters or boolean `true` to enable with default settings.
1103 *
1104 * @example
1105 * ```js
1106 * const swiper = new Swiper('.swiper', {
1107 * pagination: {
1108 * el: '.swiper-pagination',
1109 * type: 'bullets',
1110 * },
1111 * });
1112 * ```
1113 */
1114 pagination?: PaginationOptions | boolean;
1115
1116 /**
1117 * Object with parallax parameters or boolean `true` to enable with default settings.
1118 *
1119 * @example
1120 * ```js
1121 * const swiper = new Swiper('.swiper', {
1122 * parallax: true,
1123 * });
1124 * ```
1125 */
1126 parallax?: ParallaxOptions | boolean;
1127
1128 /**
1129 * Object with scrollbar parameters or boolean `true` to enable with default settings.
1130 *
1131 * @example
1132 * ```js
1133 * const swiper = new Swiper('.swiper', {
1134 * scrollbar: {
1135 * el: '.swiper-scrollbar',
1136 * draggable: true,
1137 * },
1138 * });
1139 * ```
1140 */
1141 scrollbar?: ScrollbarOptions | boolean;
1142
1143 /**
1144 * Object with thumbs component parameters
1145 *
1146 * @example
1147 * ```js
1148 * const swiper = new Swiper('.swiper', {
1149 * ...
1150 * thumbs: {
1151 * swiper: thumbsSwiper
1152 * }
1153 * });
1154 * ```
1155 */
1156 thumbs?: ThumbsOptions;
1157
1158 /**
1159 * Enables virtual slides functionality. Object with virtual slides parameters or boolean `true` to enable with default settings.
1160 *
1161 * @example
1162 * ```js
1163 * const swiper = new Swiper('.swiper', {
1164 * virtual: {
1165 * slides: ['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4', 'Slide 5'],
1166 * },
1167 * });
1168 * ```
1169 */
1170 virtual?: VirtualOptions | boolean;
1171
1172 /**
1173 * Enables zooming functionality. Object with zoom parameters or boolean `true` to enable with default settings
1174 *
1175 * @example
1176 * ```js
1177 * const swiper = new Swiper('.swiper', {
1178 * zoom: {
1179 * maxRatio: 5,
1180 * },
1181 * });
1182 * ```
1183 */
1184 zoom?: ZoomOptions | boolean;
1185
1186 /**
1187 * Enables free mode functionality. Object with free mode parameters or boolean `true` to enable with default settings.
1188 *
1189 * @example
1190 * ```js
1191 * const swiper = new Swiper('.swiper', {
1192 * freeMode: true,
1193 * });
1194 *
1195 * const swiper = new Swiper('.swiper', {
1196 * freeMode: {
1197 * enabled: true,
1198 * sticky: true,
1199 * },
1200 * });
1201 * ```
1202 */
1203 freeMode?: FreeModeOptions | boolean;
1204
1205 /**
1206 * Object with grid parameters to enable "multirow" slider.
1207 *
1208 * @example
1209 * ```js
1210 * const swiper = new Swiper('.swiper', {
1211 * grid: {
1212 * rows: 2,
1213 * },
1214 * });
1215 * ```
1216 */
1217 grid?: GridOptions;
1218
1219 /**
1220 * !INTERNAL When enabled will emit "_containerClasses" and "_slideClass" events
1221 */
1222 _emitClasses?: boolean;
1223}
1224
\No newline at end of file