swiper-vue.d.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. import type {
  2. A11yOptions,
  3. AutoplayOptions,
  4. ControllerOptions,
  5. CoverflowEffectOptions,
  6. CubeEffectOptions,
  7. FadeEffectOptions,
  8. FlipEffectOptions,
  9. CreativeEffectOptions,
  10. CardsEffectOptions,
  11. HashNavigationOptions,
  12. HistoryOptions,
  13. KeyboardOptions,
  14. MousewheelOptions,
  15. NavigationOptions,
  16. PaginationOptions,
  17. ParallaxOptions,
  18. ScrollbarOptions,
  19. ThumbsOptions,
  20. VirtualOptions,
  21. ZoomOptions,
  22. FreeModeOptions,
  23. GridOptions,
  24. } from './types/index.d.ts';
  25. import { ComponentOptionsMixin, DefineComponent, PropType, Ref } from 'vue';
  26. import type { SwiperOptions, Swiper as SwiperClass } from './types/index.d.ts';
  27. declare const Swiper: DefineComponent<
  28. {
  29. tag: {
  30. type: StringConstructor;
  31. default: string;
  32. };
  33. wrapperTag: {
  34. type: StringConstructor;
  35. default: string;
  36. };
  37. modules: {
  38. type: ArrayConstructor;
  39. default: undefined;
  40. };
  41. init: {
  42. type: BooleanConstructor;
  43. default: undefined;
  44. };
  45. direction: {
  46. type: PropType<SwiperOptions['direction']>;
  47. default: SwiperOptions['direction'];
  48. };
  49. oneWayMovement: {
  50. type: PropType<SwiperOptions['oneWayMovement']>;
  51. default: SwiperOptions['oneWayMovement'];
  52. };
  53. swiperElementNodeName: {
  54. type: PropType<SwiperOptions['swiperElementNodeName']>;
  55. default: SwiperOptions['swiperElementNodeName'];
  56. };
  57. touchEventsTarget: {
  58. type: PropType<SwiperOptions['touchEventsTarget']>;
  59. default: undefined;
  60. };
  61. initialSlide: {
  62. type: NumberConstructor;
  63. default: undefined;
  64. };
  65. speed: { type: NumberConstructor; default: undefined };
  66. cssMode: { type: BooleanConstructor; default: undefined };
  67. updateOnWindowResize: {
  68. type: BooleanConstructor;
  69. default: undefined;
  70. };
  71. resizeObserver: {
  72. type: BooleanConstructor;
  73. default: undefined;
  74. };
  75. nested: { type: BooleanConstructor; default: undefined };
  76. focusableElements: {
  77. type: StringConstructor;
  78. default: undefined;
  79. };
  80. width: { type: NumberConstructor; default: undefined };
  81. height: { type: NumberConstructor; default: undefined };
  82. preventInteractionOnTransition: {
  83. type: BooleanConstructor;
  84. default: undefined;
  85. };
  86. userAgent: { type: StringConstructor; default: undefined };
  87. url: { type: StringConstructor; default: undefined };
  88. edgeSwipeDetection: {
  89. type: BooleanConstructor | StringConstructor;
  90. default: undefined;
  91. };
  92. edgeSwipeThreshold: {
  93. type: NumberConstructor;
  94. default: undefined;
  95. };
  96. autoHeight: {
  97. type: BooleanConstructor;
  98. default: undefined;
  99. };
  100. setWrapperSize: {
  101. type: BooleanConstructor;
  102. default: undefined;
  103. };
  104. virtualTranslate: {
  105. type: BooleanConstructor;
  106. default: undefined;
  107. };
  108. effect: {
  109. type: PropType<SwiperOptions['effect']>;
  110. default: undefined;
  111. };
  112. breakpoints: {
  113. type: PropType<SwiperOptions['breakpoints']>;
  114. default: undefined;
  115. };
  116. spaceBetween: {
  117. type: PropType<SwiperOptions['spaceBetween']>;
  118. default: undefined;
  119. };
  120. slidesPerView: {
  121. type: PropType<SwiperOptions['slidesPerView']>;
  122. default: undefined;
  123. };
  124. maxBackfaceHiddenSlides: {
  125. type: NumberConstructor;
  126. default: undefined;
  127. };
  128. slidesPerGroup: {
  129. type: NumberConstructor;
  130. default: undefined;
  131. };
  132. slidesPerGroupSkip: {
  133. type: NumberConstructor;
  134. default: undefined;
  135. };
  136. slidesPerGroupAuto: {
  137. type: BooleanConstructor;
  138. default: undefined;
  139. };
  140. centeredSlides: {
  141. type: BooleanConstructor;
  142. default: undefined;
  143. };
  144. centeredSlidesBounds: {
  145. type: BooleanConstructor;
  146. default: undefined;
  147. };
  148. slidesOffsetBefore: {
  149. type: NumberConstructor;
  150. default: undefined;
  151. };
  152. slidesOffsetAfter: {
  153. type: NumberConstructor;
  154. default: undefined;
  155. };
  156. normalizeSlideIndex: {
  157. type: BooleanConstructor;
  158. default: undefined;
  159. };
  160. centerInsufficientSlides: {
  161. type: BooleanConstructor;
  162. default: undefined;
  163. };
  164. watchOverflow: {
  165. type: BooleanConstructor;
  166. default: undefined;
  167. };
  168. roundLengths: {
  169. type: BooleanConstructor;
  170. default: undefined;
  171. };
  172. touchRatio: {
  173. type: NumberConstructor;
  174. default: undefined;
  175. };
  176. touchAngle: {
  177. type: NumberConstructor;
  178. default: undefined;
  179. };
  180. simulateTouch: {
  181. type: BooleanConstructor;
  182. default: undefined;
  183. };
  184. shortSwipes: {
  185. type: BooleanConstructor;
  186. default: undefined;
  187. };
  188. longSwipes: {
  189. type: BooleanConstructor;
  190. default: undefined;
  191. };
  192. longSwipesRatio: {
  193. type: NumberConstructor;
  194. default: undefined;
  195. };
  196. longSwipesMs: {
  197. type: NumberConstructor;
  198. default: undefined;
  199. };
  200. followFinger: {
  201. type: BooleanConstructor;
  202. default: undefined;
  203. };
  204. allowTouchMove: {
  205. type: BooleanConstructor;
  206. default: undefined;
  207. };
  208. threshold: { type: NumberConstructor; default: undefined };
  209. touchMoveStopPropagation: {
  210. type: BooleanConstructor;
  211. default: undefined;
  212. };
  213. touchStartPreventDefault: {
  214. type: BooleanConstructor;
  215. default: undefined;
  216. };
  217. touchStartForcePreventDefault: {
  218. type: BooleanConstructor;
  219. default: undefined;
  220. };
  221. touchReleaseOnEdges: {
  222. type: BooleanConstructor;
  223. default: undefined;
  224. };
  225. uniqueNavElements: {
  226. type: BooleanConstructor;
  227. default: undefined;
  228. };
  229. resistance: {
  230. type: BooleanConstructor;
  231. default: undefined;
  232. };
  233. resistanceRatio: {
  234. type: NumberConstructor;
  235. default: undefined;
  236. };
  237. watchSlidesProgress: {
  238. type: BooleanConstructor;
  239. default: undefined;
  240. };
  241. grabCursor: {
  242. type: BooleanConstructor;
  243. default: undefined;
  244. };
  245. preventClicks: {
  246. type: BooleanConstructor;
  247. default: undefined;
  248. };
  249. preventClicksPropagation: {
  250. type: BooleanConstructor;
  251. default: undefined;
  252. };
  253. slideToClickedSlide: {
  254. type: BooleanConstructor;
  255. default: undefined;
  256. };
  257. loop: { type: BooleanConstructor; default: undefined };
  258. loopAddBlankSlides: { type: BooleanConstructor; default: undefined };
  259. loopAdditionalSlides: {
  260. type: NumberConstructor;
  261. default: undefined;
  262. };
  263. loopPreventsSliding: { type: BooleanConstructor; default: undefined };
  264. rewind: { type: BooleanConstructor; default: undefined };
  265. allowSlidePrev: {
  266. type: BooleanConstructor;
  267. default: undefined;
  268. };
  269. allowSlideNext: {
  270. type: BooleanConstructor;
  271. default: undefined;
  272. };
  273. swipeHandler: {
  274. type: BooleanConstructor;
  275. default: undefined;
  276. };
  277. noSwiping: {
  278. type: BooleanConstructor;
  279. default: undefined;
  280. };
  281. noSwipingClass: {
  282. type: StringConstructor;
  283. default: undefined;
  284. };
  285. noSwipingSelector: {
  286. type: StringConstructor;
  287. default: undefined;
  288. };
  289. passiveListeners: {
  290. type: BooleanConstructor;
  291. default: undefined;
  292. };
  293. containerModifierClass: {
  294. type: StringConstructor;
  295. default: undefined;
  296. };
  297. slideClass: {
  298. type: StringConstructor;
  299. default: undefined;
  300. };
  301. slideActiveClass: {
  302. type: StringConstructor;
  303. default: undefined;
  304. };
  305. slideVisibleClass: {
  306. type: StringConstructor;
  307. default: undefined;
  308. };
  309. slideFullyVisibleClass: {
  310. type: StringConstructor;
  311. default: undefined;
  312. };
  313. slideBlankClass: {
  314. type: StringConstructor;
  315. default: undefined;
  316. };
  317. slideNextClass: {
  318. type: StringConstructor;
  319. default: undefined;
  320. };
  321. slidePrevClass: {
  322. type: StringConstructor;
  323. default: undefined;
  324. };
  325. wrapperClass: {
  326. type: StringConstructor;
  327. default: undefined;
  328. };
  329. lazyPreloaderClass: {
  330. type: StringConstructor;
  331. default: undefined;
  332. };
  333. lazyPreloadPrevNext: {
  334. type: NumberConstructor;
  335. default: undefined;
  336. };
  337. runCallbacksOnInit: {
  338. type: BooleanConstructor;
  339. default: undefined;
  340. };
  341. observer: { type: BooleanConstructor; default: undefined };
  342. observeParents: {
  343. type: BooleanConstructor;
  344. default: undefined;
  345. };
  346. observeSlideChildren: {
  347. type: BooleanConstructor;
  348. default: undefined;
  349. };
  350. a11y: {
  351. type: PropType<A11yOptions | boolean>;
  352. default: undefined;
  353. };
  354. autoplay: {
  355. type: PropType<AutoplayOptions | boolean>;
  356. default: undefined;
  357. };
  358. controller: {
  359. type: PropType<ControllerOptions>;
  360. default: undefined;
  361. };
  362. coverflowEffect: {
  363. type: PropType<CoverflowEffectOptions>;
  364. default: undefined;
  365. };
  366. cubeEffect: {
  367. type: PropType<CubeEffectOptions>;
  368. default: undefined;
  369. };
  370. fadeEffect: {
  371. type: PropType<FadeEffectOptions>;
  372. default: undefined;
  373. };
  374. flipEffect: {
  375. type: PropType<FlipEffectOptions>;
  376. default: undefined;
  377. };
  378. creativeEffect: {
  379. type: PropType<CreativeEffectOptions>;
  380. default: undefined;
  381. };
  382. cardsEffect: {
  383. type: PropType<CardsEffectOptions>;
  384. default: undefined;
  385. };
  386. hashNavigation: {
  387. type: PropType<HashNavigationOptions | boolean>;
  388. default: undefined;
  389. };
  390. history: {
  391. type: PropType<HistoryOptions | boolean>;
  392. default: undefined;
  393. };
  394. keyboard: {
  395. type: PropType<KeyboardOptions | boolean>;
  396. default: undefined;
  397. };
  398. mousewheel: {
  399. type: PropType<MousewheelOptions | boolean>;
  400. default: undefined;
  401. };
  402. navigation: {
  403. type: PropType<NavigationOptions | boolean>;
  404. default: undefined;
  405. };
  406. pagination: {
  407. type: PropType<PaginationOptions | boolean>;
  408. default: undefined;
  409. };
  410. parallax: {
  411. type: PropType<ParallaxOptions | boolean>;
  412. default: undefined;
  413. };
  414. scrollbar: {
  415. type: PropType<ScrollbarOptions | boolean>;
  416. default: undefined;
  417. };
  418. thumbs: { type: PropType<ThumbsOptions>; default: undefined };
  419. virtual: {
  420. type: PropType<VirtualOptions | boolean>;
  421. default: undefined;
  422. };
  423. zoom: {
  424. type: PropType<ZoomOptions | boolean>;
  425. default: undefined;
  426. };
  427. freeMode: {
  428. type: PropType<FreeModeOptions | boolean>;
  429. default: undefined;
  430. };
  431. grid: {
  432. type: PropType<GridOptions>;
  433. default: undefined;
  434. };
  435. },
  436. () => JSX.Element,
  437. unknown,
  438. {},
  439. {},
  440. ComponentOptionsMixin,
  441. ComponentOptionsMixin,
  442. {
  443. swiper: (swiper: SwiperClass) => void;
  444. /**
  445. * Event will be fired in when autoplay started
  446. */
  447. autoplayStart: (swiper: SwiperClass) => void;
  448. /**
  449. * Event will be fired when autoplay stopped
  450. */
  451. autoplayStop: (swiper: SwiperClass) => void;
  452. /**
  453. * Event will be fired on autoplay pause
  454. */
  455. autoplayPause: (swiper: SwiperClass) => void;
  456. /**
  457. * Event will be fired on autoplay resume
  458. */
  459. autoplayResume: (swiper: SwiperClass) => void;
  460. /**
  461. * Event triggers continuously while autoplay is enabled. It contains time left (in ms) before transition to next slide and percentage of that time related to autoplay delay
  462. */
  463. autoplayTimeLeft: (swiper: SwiperClass, timeLeft: number, percentage: number) => void;
  464. /**
  465. * Event will be fired when slide changed with autoplay
  466. */
  467. autoplay: (swiper: SwiperClass) => void;/**
  468. * Event will be fired on window hash change
  469. */
  470. hashChange: (swiper: SwiperClass) => void;
  471. /**
  472. * Event will be fired when swiper updates the hash
  473. */
  474. hashSet: (swiper: SwiperClass) => void;/**
  475. * Event will be fired on key press
  476. */
  477. keyPress: (swiper: SwiperClass, keyCode: string) => void;/**
  478. * Event will be fired on mousewheel scroll
  479. */
  480. scroll: (swiper: SwiperClass, event: WheelEvent) => void;/**
  481. * Event will be fired on navigation hide
  482. */
  483. navigationHide: (swiper: SwiperClass) => void;
  484. /**
  485. * Event will be fired on navigation show
  486. */
  487. navigationShow: (swiper: SwiperClass) => void;
  488. /**
  489. * Event will be fired on navigation prev button click
  490. */
  491. navigationPrev: (swiper: SwiperClass) => void;
  492. /**
  493. * Event will be fired on navigation next button click
  494. */
  495. navigationNext: (swiper: SwiperClass) => void;/**
  496. * Event will be fired after pagination rendered
  497. */
  498. paginationRender: (swiper: SwiperClass, paginationEl: HTMLElement) => void;
  499. /**
  500. * Event will be fired when pagination updated
  501. */
  502. paginationUpdate: (swiper: SwiperClass, paginationEl: HTMLElement) => void;
  503. /**
  504. * Event will be fired on pagination hide
  505. */
  506. paginationHide: (swiper: SwiperClass) => void;
  507. /**
  508. * Event will be fired on pagination show
  509. */
  510. paginationShow: (swiper: SwiperClass) => void;/**
  511. * Event will be fired on draggable scrollbar drag start
  512. */
  513. scrollbarDragStart: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  514. /**
  515. * Event will be fired on draggable scrollbar drag move
  516. */
  517. scrollbarDragMove: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  518. /**
  519. * Event will be fired on draggable scrollbar drag end
  520. */
  521. scrollbarDragEnd: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;/**
  522. * Event will be fired on zoom change
  523. */
  524. zoomChange: (swiper: SwiperClass, scale: number, imageEl: HTMLElement, slideEl: HTMLElement) => void;
  525. /**
  526. * Fired right after Swiper initialization.
  527. * @note Note that with `swiper.on('init')` syntax it will
  528. * work only in case you set `init: false` parameter.
  529. *
  530. * @example
  531. * ```js
  532. * const swiper = new Swiper('.swiper', {
  533. * init: false,
  534. * // other parameters
  535. * });
  536. * swiper.on('init', function() {
  537. * // do something
  538. * });
  539. * // init Swiper
  540. * swiper.init();
  541. * ```
  542. *
  543. * @example
  544. * ```js
  545. * // Otherwise use it as the parameter:
  546. * const swiper = new Swiper('.swiper', {
  547. * // other parameters
  548. * on: {
  549. * init: function () {
  550. * // do something
  551. * },
  552. * }
  553. * });
  554. * ```
  555. */
  556. init: (swiper: SwiperClass) => any;
  557. /**
  558. * Event will be fired right before Swiper destroyed
  559. */
  560. beforeDestroy: (swiper: SwiperClass) => void;
  561. /**
  562. * Event will be fired after slides and their sizes are calculated and updated
  563. */
  564. slidesUpdated: (swiper: SwiperClass) => void;
  565. /**
  566. * Event will be fired when currently active slide is changed
  567. */
  568. slideChange: (swiper: SwiperClass) => void;
  569. /**
  570. * Event will be fired in the beginning of animation to other slide (next or previous).
  571. */
  572. slideChangeTransitionStart: (swiper: SwiperClass) => void;
  573. /**
  574. * Event will be fired after animation to other slide (next or previous).
  575. */
  576. slideChangeTransitionEnd: (swiper: SwiperClass) => void;
  577. /**
  578. * Same as "slideChangeTransitionStart" but for "forward" direction only
  579. */
  580. slideNextTransitionStart: (swiper: SwiperClass) => void;
  581. /**
  582. * Same as "slideChangeTransitionEnd" but for "forward" direction only
  583. */
  584. slideNextTransitionEnd: (swiper: SwiperClass) => void;
  585. /**
  586. * Same as "slideChangeTransitionStart" but for "backward" direction only
  587. */
  588. slidePrevTransitionStart: (swiper: SwiperClass) => void;
  589. /**
  590. * Same as "slideChangeTransitionEnd" but for "backward" direction only
  591. */
  592. slidePrevTransitionEnd: (swiper: SwiperClass) => void;
  593. /**
  594. * Event will be fired in the beginning of transition.
  595. */
  596. transitionStart: (swiper: SwiperClass) => void;
  597. /**
  598. * Event will be fired after transition.
  599. */
  600. transitionEnd: (swiper: SwiperClass) => void;
  601. /**
  602. * Event will be fired when user touch Swiper. Receives `pointerdown` event as an arguments.
  603. */
  604. touchStart: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  605. /**
  606. * Event will be fired when user touch and move finger over Swiper. Receives `pointermove` event as an arguments.
  607. */
  608. touchMove: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  609. /**
  610. * Event will be fired when user touch and move finger over Swiper in direction opposite to direction parameter. Receives `pointermove` event as an arguments.
  611. */
  612. touchMoveOpposite: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  613. /**
  614. * Event will be fired when user touch and move finger over Swiper and move it. Receives `pointermove` event as an arguments.
  615. */
  616. sliderMove: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  617. /**
  618. * Event will be fired when user release Swiper. Receives `pointerup` event as an arguments.
  619. */
  620. touchEnd: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  621. /**
  622. * Event will be fired when user click/tap on Swiper. Receives `pointerup` event as an arguments.
  623. */
  624. click: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  625. /**
  626. * Event will be fired when user click/tap on Swiper. Receives `pointerup` event as an arguments.
  627. */
  628. tap: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  629. /**
  630. * Event will be fired when user double tap on Swiper's container. Receives `pointerup` event as an arguments
  631. */
  632. doubleTap: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  633. /**
  634. * Event will be fired when Swiper progress is changed, as an arguments it receives progress that is always from 0 to 1
  635. */
  636. progress: (swiper: SwiperClass, progress: number) => void;
  637. /**
  638. * Event will be fired when Swiper reach its beginning (initial position)
  639. */
  640. reachBeginning: (swiper: SwiperClass) => void;
  641. /**
  642. * Event will be fired when Swiper reach last slide
  643. */
  644. reachEnd: (swiper: SwiperClass) => void;
  645. /**
  646. * Event will be fired when Swiper goes to beginning or end position
  647. */
  648. toEdge: (swiper: SwiperClass) => void;
  649. /**
  650. * Event will be fired when Swiper goes from beginning or end position
  651. */
  652. fromEdge: (swiper: SwiperClass) => void;
  653. /**
  654. * Event will be fired when swiper's wrapper change its position. Receives current translate value as an arguments
  655. */
  656. setTranslate: (swiper: SwiperClass, translate: number) => void;
  657. /**
  658. * Event will be fired everytime when swiper starts animation. Receives current transition duration (in ms) as an arguments
  659. */
  660. setTransition: (swiper: SwiperClass, transition: number) => void;
  661. /**
  662. * Event will be fired on window resize right before swiper's onresize manipulation
  663. */
  664. resize: (swiper: SwiperClass) => void;
  665. /**
  666. * Event will be fired if observer is enabled and it detects DOM mutations
  667. */
  668. observerUpdate: (swiper: SwiperClass) => void;
  669. /**
  670. * Event will be fired right before "loop fix"
  671. */
  672. beforeLoopFix: (swiper: SwiperClass) => void;
  673. /**
  674. * Event will be fired after "loop fix"
  675. */
  676. loopFix: (swiper: SwiperClass) => void;
  677. /**
  678. * Event will be fired on breakpoint change
  679. */
  680. breakpoint: (swiper: SwiperClass, breakpointParams: SwiperOptions) => void;
  681. /**
  682. * !INTERNAL: Event will fired right before breakpoint change
  683. */
  684. _beforeBreakpoint: (swiper: SwiperClass, breakpointParams: SwiperOptions) => void;
  685. /**
  686. * !INTERNAL: Event will fired after setting CSS classes on swiper container element
  687. */
  688. _containerClasses: (swiper: SwiperClass, classNames: string) => void;
  689. /**
  690. * !INTERNAL: Event will fired after setting CSS classes on swiper slide element
  691. */
  692. _slideClass: (swiper: SwiperClass, slideEl: HTMLElement, classNames: string) => void;
  693. /**
  694. * !INTERNAL: Event will fired after setting CSS classes on all swiper slides
  695. */
  696. _slideClasses: (
  697. swiper: SwiperClass,
  698. slides: { slideEl: HTMLElement; classNames: string; index: number }[],
  699. ) => void;
  700. /**
  701. * !INTERNAL: Event will fired as soon as swiper instance available (before init)
  702. */
  703. _swiper: (swiper: SwiperClass) => void;
  704. /**
  705. * !INTERNAL: Event will be fired on free mode touch end (release) and there will no be momentum
  706. */
  707. _freeModeNoMomentumRelease: (swiper: SwiperClass) => void;
  708. /**
  709. * Event will fired on active index change
  710. */
  711. activeIndexChange: (swiper: SwiperClass) => void;
  712. /**
  713. * Event will fired on snap index change
  714. */
  715. snapIndexChange: (swiper: SwiperClass) => void;
  716. /**
  717. * Event will fired on real index change
  718. */
  719. realIndexChange: (swiper: SwiperClass) => void;
  720. /**
  721. * Event will fired right after initialization
  722. */
  723. afterInit: (swiper: SwiperClass) => void;
  724. /**
  725. * Event will fired right before initialization
  726. */
  727. beforeInit: (swiper: SwiperClass) => void;
  728. /**
  729. * Event will fired before resize handler
  730. */
  731. beforeResize: (swiper: SwiperClass) => void;
  732. /**
  733. * Event will fired before slide change transition start
  734. */
  735. beforeSlideChangeStart: (swiper: SwiperClass) => void;
  736. /**
  737. * Event will fired before transition start
  738. */
  739. beforeTransitionStart: (swiper: SwiperClass, speed: number, internal: any) => void; // what is internal?
  740. /**
  741. * Event will fired on direction change
  742. */
  743. changeDirection: (swiper: SwiperClass) => void;
  744. /**
  745. * Event will be fired when user double click/tap on Swiper
  746. */
  747. doubleClick: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
  748. /**
  749. * Event will be fired on swiper destroy
  750. */
  751. destroy: (swiper: SwiperClass) => void;
  752. /**
  753. * Event will be fired on momentum bounce
  754. */
  755. momentumBounce: (swiper: SwiperClass) => void;
  756. /**
  757. * Event will be fired on orientation change (e.g. landscape -> portrait)
  758. */
  759. orientationchange: (swiper: SwiperClass) => void;
  760. /**
  761. * Event will be fired in the beginning of animation of resetting slide to current one
  762. */
  763. slideResetTransitionStart: (swiper: SwiperClass) => void;
  764. /**
  765. * Event will be fired in the end of animation of resetting slide to current one
  766. */
  767. slideResetTransitionEnd: (swiper: SwiperClass) => void;
  768. /**
  769. * Event will be fired with first touch/drag move
  770. */
  771. sliderFirstMove: (swiper: SwiperClass, event: TouchEvent) => void;
  772. /**
  773. * Event will be fired when number of slides has changed
  774. */
  775. slidesLengthChange: (swiper: SwiperClass) => void;
  776. /**
  777. * Event will be fired when slides grid has changed
  778. */
  779. slidesGridLengthChange: (swiper: SwiperClass) => void;
  780. /**
  781. * Event will be fired when snap grid has changed
  782. */
  783. snapGridLengthChange: (swiper: SwiperClass) => void;
  784. /**
  785. * Event will be fired after swiper.update() call
  786. */
  787. update: (swiper: SwiperClass) => void;
  788. /**
  789. * Event will be fired when swiper is locked (when `watchOverflow` enabled)
  790. */
  791. lock: (swiper: SwiperClass) => void;
  792. /**
  793. * Event will be fired when swiper is unlocked (when `watchOverflow` enabled)
  794. */
  795. unlock: (swiper: SwiperClass) => void;
  796. }
  797. >;
  798. declare const SwiperSlide: DefineComponent<{
  799. tag: {
  800. type: StringConstructor;
  801. default: string;
  802. };
  803. swiperRef: { type: PropType<SwiperClass>; required: false };
  804. lazy: { type: BooleanConstructor; default: false };
  805. zoom: { type: BooleanConstructor; default: undefined };
  806. virtualIndex: {
  807. type: StringConstructor | NumberConstructor;
  808. default: undefined;
  809. };
  810. }>;
  811. declare const useSwiper: () => Ref<SwiperClass>;
  812. declare const useSwiperSlide: () => Ref<{
  813. isActive: boolean;
  814. isVisible: boolean;
  815. isPrev: boolean;
  816. isNext: boolean;
  817. }>;
  818. export { Swiper, SwiperSlide, useSwiper, useSwiperSlide };