@atlaskit/motion
Version:
A set of utilities to apply motion in your application.
33 lines (32 loc) • 1.36 kB
TypeScript
import React from 'react';
import { type KeyframesMotionProps } from './keyframes-motion';
import type { Direction, Distance } from './types';
/**
* Props for controlling the behavior of the FadeIn animation
*/
export interface FadeKeyframesMotionProps extends Omit<KeyframesMotionProps, 'animationTimingFunction' | 'animationTimingFunctionExiting'> {
/**
* The direction the element will enter from using a slide animation. If undefined, no slide will be applied.
*/
entranceDirection?: Direction;
/**
* The direction the element will exit to using a slide animation.
* If undefined but `entranceDirection` is set, it will exit to the opposite side by default.
*/
exitDirection?: Direction;
/**
* The distance the element moves in a direction-based animation.
* A `proportional` distance is based on the size of the element.
* A `constant` distance will always move the same amount, regardless of size.
*/
distance?: Distance;
}
/**
* __FadeIn__
*
* Useful for fading in one or more elements.
*
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/motion/docs/entering-motions)
*/
declare const FadeIn: ({ children, duration, entranceDirection, exitDirection, distance, onFinish, isPaused, }: FadeKeyframesMotionProps) => React.JSX.Element;
export default FadeIn;