Getting startedChangelog
Examples
itemsToScrollitemsToShowbreakPointsverticalModeinitialActiveIndexfocusOnSelectisRTLenableAutoPlayitemPaddingouterSpacingshowEmptySlotsitemPositioneasingrenderArrowSignatureDemorenderPaginationautoTabIndexVisibleItemsonChangeonNextStartonNextEndonPrevStartonPrevEndonResizeslideNext / slidePrevgoToStyling
renderArrow
You can provide custom Arrow buttons.
Signature
- You can pass a function that returns a react element,
This function is a render prop and its signature is:
({type, onClick, isEdge}) => {/* return your element here */}
typewill be eitherconsts.PREVorconsts.NEXT, depends on the relevant arrow direction.onClickIs the hook to the inneronClickof theCarousel. You can attach it wherever you want within the returned component.isEdgeWill be true when there are no more items to show for this direction.
You should import the consts object to check the arrow direction
import Carousel, { consts } from 'react-elastic-carousel';// ....type === consts.PREV