Typings for the preset motion animation effects that come with the library's motion effect bank.

interface LibraryPresetMotionEffects {
    ~move-to: {
        defaultConfig: {};
        immutableConfig: {};
        generateKeyframes(targetElem: undefined | null | Element, translationOptions?: Partial<MoveToOptions>): {
            backwardFrames: {
                translate: string;
            }[];
            forwardFrames: {
                translate: string;
            }[];
        };
    };
    ~translate: {
        defaultConfig: {};
        immutableConfig: {};
        generateKeyframes(translationOptions?: Partial<TranslateOptions>): {
            backwardFrames: {
                translate: string;
            }[];
            forwardFrames: {
                translate: string;
            }[];
        };
    };
}

Properties

Properties

~move-to: {
    defaultConfig: {};
    immutableConfig: {};
    generateKeyframes(targetElem: undefined | null | Element, translationOptions?: Partial<MoveToOptions>): {
        backwardFrames: {
            translate: string;
        }[];
        forwardFrames: {
            translate: string;
        }[];
    };
} = ...

Element is moved with respect to another element.

Type declaration

  • defaultConfig: {}
    • immutableConfig: {}
      • generateKeyframes:function
        • Parameters

          • targetElem: undefined | null | Element

            element to which our element should move

          • translationOptions: Partial<MoveToOptions> = {}

            options defining the behavior of the motion

          Returns {
              backwardFrames: {
                  translate: string;
              }[];
              forwardFrames: {
                  translate: string;
              }[];
          }

          • backwardFrames: {
                translate: string;
            }[]
          • forwardFrames: {
                translate: string;
            }[]
      ~translate: {
          defaultConfig: {};
          immutableConfig: {};
          generateKeyframes(translationOptions?: Partial<TranslateOptions>): {
              backwardFrames: {
                  translate: string;
              }[];
              forwardFrames: {
                  translate: string;
              }[];
          };
      } = ...

      Element moves based on the specified translation options.

      Type declaration

      • defaultConfig: {}
        • immutableConfig: {}
          • generateKeyframes:function
            • Parameters

              Returns {
                  backwardFrames: {
                      translate: string;
                  }[];
                  forwardFrames: {
                      translate: string;
                  }[];
              }

              • backwardFrames: {
                    translate: string;
                }[]
              • forwardFrames: {
                    translate: string;
                }[]