esl icon indicating copy to clipboard operation
esl copied to clipboard

[🚀esl-carousel]: update carousel Public API

Open ala-n opened this issue 2 years ago • 0 comments

As an ESL architect, I want to be sure that the carousel component have simple and powerful enough API to control carousel state

Primary API points and methods:

  • State markers + configurable state classes
  • A11ty attributes managed for slides and carousel in general
  • Should consist of the main esl-carousel component, mandatory esl-carousel-slide (esl-carousel-item) inner component, and optional carousel plugins components
  • Should dispatch event hooks for the following stages:
    • before slide change
    • after slide change
    • configuration change
  • goTo(position, direction) (name is discussable) method to change carousel active alides
  • next/prev shortcut functions to move carousel back and forward
  • size read-only property that describes the number of inner slides (items)
  • $slides readonly slides accessor
  • sceneSize - read-only count of visible slides, configurable using config property
  • index - read-only first active slide index
  • $activeSlides - array of the active slide elements
  • $activeSlide - first active slide

ala-n avatar Sep 09 '21 01:09 ala-n