Animations
Animation Props

Common Animation Props

These props are applicable to all animations in the React-swift-reveal library. Here are the common props along with their default values:

{
  out: false,
  left: false,
  right: false,
  top: false,
  bottom: false,
  mirror: false,
  opposite: false,
  timeout: 0,
  duration: 1000,
  delay: 0,
  count: 1,
  forever: false,
  distance: '100%',
  big: false,
}

Prop Details

PropTypeDefaultDescription
outbooleanfalseIf true, the animation will be reversed.
leftbooleanfalseIf true, the animation will start from the left.
rightbooleanfalseIf true, the animation will start from the right.
topbooleanfalseIf true, the animation will start from the top.
bottombooleanfalseIf true, the animation will start from the bottom.
mirrorbooleanfalseIf true, the animation will be mirrored.
oppositebooleanfalseIf true, the animation will be the opposite of the direction specified.
timeoutnumber0The time in milliseconds to wait before starting the animation.
durationnumber1000The time in milliseconds for the animation to complete.
delaynumber0The time in milliseconds to wait before starting the animation.
countnumber1The number of times the animation should repeat.
foreverbooleanfalseIf true, the animation will repeat forever.
distancestring'100%'The distance the animation should travel.
bigbooleanfalseIf true, the animation will be bigger.

Example Usage

<Fade duration={1000} delay={0} count={1} />
<Bounce top count={2} distance="20px" />
<Slide left duration={800} delay={300} />