Skip to content

Develop Public API Methods #1

Description

@abritopach
  • select | select(slideId: string) => Promise Navigates to a slide with the specified identifier.

  • prev | prev() => Promise Navigates to the previous slide.

  • next | next() => Promise Navigates to the next slide.

  • pause | pause() => void Pauses cycling through the slides.

  • cycle | cycle() => Promise Restarts cycling through the slides from left to right.

  • getActiveIndex => Promise Get the index of the active slide.

  • isBeginning => Promise Get whether or not the current slide is the first slide.

  • isEnd => Promise Get whether or not the current slide is the last slide.

  • length => Promise Get the total number of slides.

  • getPreviousIndex => Promise Get the index of the previous slide.

  • getNextIndex => Promise Get the index of the next slide.

  • slideReset => Promise Reset swiper position to initial slide.

  • appendSlide(slide | slides) => Promise<CardItem[]> Add new slide / slides to the end. Slides could be new slide or array with such slides.

  • prependSlide(slide | slides) => Promise<CardItem[]> Add new slide / slides to the beginning. Slides could be new slide or array with such slides.

  • addSlide(index, slides) => Promise<CardItem[]> Add new slides to the required index. Slides could be new slide or array with such slides.

  • removeSlide(slideIndex) => Promise<CardItem[]> Remove selected slides. SlideIndex could be a number with slide index to remove or array with indexes.

  • moreSlides => Promise Checks if the number of slides is greater than the number of visible slides

  • removeAllSlides => Promise<CardItem[]> Remove all slides

  • reloadSlides => Promise<CardItem[]> Reload slides

  • changeMode => Promise Switch mode: horizontal (default) or vertical

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions