Skip to main content

CaSlider

A slider used for product sliding or image gallery

SASS-path: ./styles/components/molecules/ca-slider.scss

Props

NameDescriptionTypeRequiredDefault
centeredShould the slider be centered?Booleanfalsefalse
infiniteShould the slider have infinite sliding?Booleanfalsetrue
nrOfSlidesNumber of slidesNumbertrue-
dotsShould dots be displayedBooleanfalsefalse
arrowsShould arrows be displayedBooleanfalsefalse
arrowIconNameFirst part of icon name for the arrows. Will add '-left', '-right', '-up' or '-down' as fittingStringfalsechevron
slidesToScrollNumber of slides to scrollNumberfalse1

Events

Event NameDescriptionParameters
slideChange--

Slots

NameDescriptionDefault Slot Content
slides--

Methods

MethodDescriptionParameters
shiftSlideUsed to shift slide. Use a negative or positive number for back or forthslide change (Number), sliding transition (Boolean)
goToSlideGo to specific slideslide index (Number), sliding transition (Boolean)
setCurrentSlideUsed by shiftSlide and goToSlide to set a new value to currentSlide. Adjusts value to not show empty space when not infiniteslide (Number)
resetIndexUsed to reset the index when infinite sliding is used, when going from last to first again-
nextSlideNavigate to next slide-
prevSlideNavigate to previous slide-
gestureStartHandles the start of a touch or point and drag event-
gestureMoveHandles moving of a touch or point and drag event-
gestureEndHandles the end of a touch or point and drag event. Calls shiftSlide with corresponding value of the gesture-