Automotion docs

Component element

Embeds a prebuilt component from the versioned library by exact `name` + `version`. Props are validated against the component version's own schema at render time.

Embeds a prebuilt component from the versioned library by exact name + version. Props are validated against the component version's own schema at render time.

Properties

PropertyTypeDefaultDescription
id *string (non-empty)Stable identifier, unique across the whole movie. Used by editor selection sync and error paths.
startnumber (≥ 0)0When the element appears, in seconds relative to its scene (or to the movie for movie-level elements).
durationnumber (> 0)How long the element is active, in seconds. Defaults to the remainder of its scene.
positionobject | "top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right""center"Where to place the element: absolute {x, y} pixels or a named anchor.
widthnumber (> 0)Element box width in output pixels. Defaults to an element-specific intrinsic size.
heightnumber (> 0)Element box height in output pixels. Defaults to an element-specific intrinsic size.
opacitynumber (0–1)1Element opacity from 0 (invisible) to 1 (fully opaque).
rotationnumber0Rotation around the element's center, in degrees (clockwise).
animationobjectEntrance animation applied when the element appears.
type *"component"A prebuilt component from the Automotion library.
name *string (non-empty)Name of a prebuilt component from the Automotion component library.
version *string (matches ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$)Semver version of the component to render.
propsobject\{}Props passed to the component. Validated against the component's own schema at render time.

position object

Absolute pixel position of the element's center.

PropertyTypeDefaultDescription
x *numberHorizontal position of the element's center, in output pixels from the left edge.
y *numberVertical position of the element's center, in output pixels from the top edge.

animation object

Entrance animation applied when the element appears.

PropertyTypeDefaultDescription
preset *"none" | "fade" | "slide-in-left" | "slide-in-right" | "slide-in-up" | "slide-in-down" | "zoom-in" | "zoom-out"Entrance animation preset applied when the element appears.
easing"linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out""ease"Easing curve applied to the animation.
durationnumber (> 0)0.5Animation duration in seconds.

Example

Component: prebuilt library components addressed by name@version:

movie.json
{
  "schema": "v1",
  "preset": "9:16",
  "scenes": [
    {
      "id": "components",
      "duration": 5,
      "background": "#082f49",
      "elements": [
        {
          "id": "components-headline",
          "type": "component",
          "name": "animated-headline",
          "version": "1.0.0",
          "props": {
            "text": "Ship videos with code",
            "fontSize": 80
          },
          "position": {
            "x": 540,
            "y": 700
          }
        },
        {
          "id": "components-progress",
          "type": "component",
          "name": "progress-bar",
          "version": "1.1.0",
          "props": {
            "progress": 0.8,
            "width": 720,
            "color": "#22d3ee"
          },
          "position": {
            "x": 540,
            "y": 1400
          }
        }
      ]
    }
  ]
}

▶ Try it in the playground

On this page