Back to Woocommerce

README

packages/js/components/src/animation-slider/README.md

10.8.0-dev933 B
Original Source

AnimationSlider

This component creates slideable content controlled by an animate prop to direct the contents to slide left or right. All other props are passed to CSSTransition. More info at http://reactcommunity.org/react-transition-group/css-transition

Usage

jsx
<AnimationSlider animationKey="1" animate="right">
	{ ( status ) => (
		<span>One (1)</span>
	) }
</AnimationSlider>

Props

NameTypeDefaultDescription
childrenfunctionnull(required) A function returning rendered content with argument status, reflecting CSSTransition status
animationKeyanynull(required) A unique identifier for each slideable page
animatestringnullnull, 'left', 'right', to designate which direction to slide on a change
onExitedfunctionnullA function to be executed after a transition is complete, passing the containing ref as the argument