@ebay/skin/carousel
DS v1.1Carousels display a list of similar items in a scrolling, horizontal viewport. Items may be entirely static (e.g. an image), entirely interactive (e.g. button) or contain a mix of static and interactive elements (e.g. a heading, image and link).
Items may be ungrouped and scrolled in a continuous manner, or grouped and scrolled via a discrete number of slides.
NOTE: No JavaScript behaviour has been implemented in the carousel examples (i.e. the left & right paddle controls are non-functional), we demonstrate the CSS aspect only. For detailed behaviour requirements, please visit the eBay MIND Pattern for Carousel.
Continuous Carousel
The default carousel is a continuous carousel. Continuous carousels have no concept of slides, only a continuous flow of items.
Continuous carousels cannot guarantee any kind of "peek", therefore a faded mask is applied to the viewport as visual affordance. To disable the mask, when the carousel has reached the end of the content, simply remove the carousel__viewport--mask modifier.
Slide Carousel
A slide carousel has a discrete number of items in the viewport. Each group of items constitutes a "slide".
For visual affordance, instead of a faded mask, slide carousels are always able to show a "peek" of more content.
A slide carousel requires an ARIA live-region (typically also a heading) to convey slide updates to assistive technology.
Slideshow Carousel
A slideshow carousel is a discrete carousel that shows exactly one item per slide; it requires no other visual affordance than a play/pause button.
A slideshow carousel can be set to autoplay, but must loop no more than once.