The AnimationWrapper provides an eye-catching initial animation to its children.
You should have the chayns-components
package installed. If that is not the
case already, run
yarn add chayns-components
or
npm i chayns-components
After the chayns-components
package is installed, you can import the component
and use it with React:
import React from 'react'
import { AnimationWrapper } from 'chayns-components';
// ...
<AnimationWrapper {...} />
The AnimationWrapper
-component takes the following props:
Name | Type | Default | Required |
---|---|---|---|
children | ReactNode |
<div /> |
|
animationTime | number |
0.2 |
|
setAutoTime | number |
400 |
children?: ReactNode
The children that should be animated.
animationTime?: number
The duration of the animation in seconds.
setAutoTime?: number
The time until the height of the content is set to auto to reflect changes in children size.