MotionScript

@motion-script/core


@motion-script/core / ImageFit

Type Alias: ImageFit

ImageFit = "fill" | "fit" | "tile" | "stretch"

Defined in: attributes/shape/fill/implementations/image.ts:21

How an image (or video frame) is scaled into its node's bounds.

  • 'fill' — scale uniformly to cover the bounds, cropping the overflow. The Figma-style default; no distortion, no letterboxing.
  • 'fit' — scale uniformly to be fully contained, letterboxing as needed.
  • 'tile' — repeat the image at its native size (× zoom).
  • 'stretch'— scale each axis independently to fill the bounds exactly, distorting the aspect ratio.