@types/react-native-simple-animations
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Installation

npm install --save @types/react-native-simple-animations

Summary

This package contains type definitions for react-native-simple-animations (https://www.npmjs.com/package/react-native-simple-animations).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-simple-animations.

import { Component, ReactNode } from "react";
import { EasingFunction, ViewStyle } from "react-native";

export interface SimpleAnimationProps {
    /**
     * Whether the child component will animate in or out
     * @default "in"
     */
    aim?: "in" | "out" | undefined;

    /**
     * When true the child component will animate
     * @default true
     */
    animate?: boolean | undefined;

    /**
     * When true the child component will animate if any of the props change
     * @default false
     */
    animateOnUpdate?: boolean | undefined;

    /**
     * The length in milliseconds the component will wait before animating
     * @default 0
     */
    delay?: number | undefined;

    /**
     * When movementType is set, this is the direction the child component will move
     */
    direction?: "down" | "left" | "right" | "up" | undefined;

    /**
     * When movementType is set, this is the distance the child component will move
     * @default 0
     */
    distance?: number | undefined;

    /**
     * The length in milliseconds the animation will last
     * @default 1000
     */
    duration?: number | undefined;

    /**
     * The easing function to define animation curve
     * @default Easing.out(Easing.exp)
     */
    easing?: EasingFunction | undefined;

    /**
     * When true the child component will fade in or out depending on the aim
     * @default true
     */
    fade?: boolean | undefined;

    /**
     * Amount of friction when movementType is "spring" or staticType is "bounce"
     * @default 5
     */
    friction?: number | undefined;

    /**
     * Type of movement animation when direction and distance are set
     */
    movementType?: "slide" | "spring" | undefined;

    /**
     * Type of static animation
     */
    staticType?: "bounce" | "zoom" | undefined;

    /**
     * Additional styles applied to the component
     */
    style?: ViewStyle | undefined;

    /**
     * Amount of tension when movementType is "spring" or staticType is "bounce"
     * @default 100
     */
    tension?: number | undefined;

    /**
     * When true the animation is sent to native before starting
     * @default true
     */
    useNativeDriver?: boolean | undefined;

    /**
     * Child components to animate
     */
    children?: ReactNode | undefined;
}
export class SimpleAnimation extends Component<SimpleAnimationProps> {}

Additional Details

Credits

These definitions were written by 422.io.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-simple-animations

Weekly Downloads

14

Version

0.3.0

License

MIT

Unpacked Size

7.72 kB

Total Files

5

Last publish

Collaborators

  • types