React Elastic Carousel
Edit page
Getting started
Examples
itemsToScrollitemsToShowbreakPointsverticalModeinitialActiveIndexfocusOnSelectisRTLenableAutoPlayitemPaddingouterSpacingshowEmptySlotsitemPositioneasingrenderArrowSignatureDemorenderPaginationautoTabIndexVisibleItemsonChangeonNextStartonNextEndonPrevStartonPrevEndonResizeslideNext / slidePrevgoToStyling
Changelog

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 either consts.PREV or consts.NEXT, depends on the relevant arrow direction.
  • onClick Is the hook to the inner onClick of the Carousel. 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

Demo