Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.4 KB

animation-wrapper.md

File metadata and controls

73 lines (48 loc) · 1.4 KB

AnimationWrapper

Source

The AnimationWrapper provides an eye-catching initial animation to its children.

Usage

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 {...} />

Props

The AnimationWrapper-component takes the following props:

Name Type Default Required
children ReactNode <div />
animationTime number 0.2
setAutoTime number 400

children

children?: ReactNode

The children that should be animated.


animationTime

animationTime?: number

The duration of the animation in seconds.


setAutoTime

setAutoTime?: number

The time until the height of the content is set to auto to reflect changes in children size.