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 */}
type
will be eitherconsts.PREV
orconsts.NEXT
, depends on the relevant arrow direction.onClick
Is the hook to the inneronClick
of theCarousel
. You can attach it wherever you want within the returned component.isEdge
Will 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