HOC SiteDokümantasyon

Lottie

Decoration and visibility use Dekorasyon ve görünürlük (BlockShell).

Lottie animation player. src is a .json or .lottie file; playback is controlled by trigger, autoplay, loop, and speed. fit/aspectRatio control the frame.

Fields

label

Accessible name for the animation.

label: [{ if: "*", is: "Loading animation" }]

src

Public URL of the Lottie JSON file.

src: [{ if: "*", is: "https://cdn.example/hero.json" }]

content

playback

loop

Loop playback.

content: {
  playback: {
    loop: [{ if: "*", is: true }]
  }
}
autoplay

Start playback automatically for the load trigger.

content: {
  playback: {
    autoplay: [{ if: "*", is: true }]
  }
}
speed

Playback speed multiplier.

content: {
  playback: {
    speed: [{ if: "*", is: 1 }]
  }
}
scrollStart

Viewport line that starts scroll-triggered playback.

content: {
  playback: {
    scrollStart: [{ if: "*", is: "middle" }]
  }
}

trigger

Playback trigger: load, hover, click, or scroll.

trigger: [{ if: "*", is: "load" }]

layout

frame

fit

contain keeps the whole frame; cover fills it.

layout: {
  frame: {
    fit: [{ if: "*", is: "contain" }]
  }
}
aspectRatio

Frame ratio: auto, 1:1, 4:3, or 16:9.

layout: {
  frame: {
    aspectRatio: [{ if: "*", is: "auto" }]
  }
}

Default props

{
  "src": [
    {
      "if": "*",
      "is": ""
    }
  ],
  "trigger": [
    {
      "if": "*",
      "is": "load"
    }
  ],
  "label": [
    {
      "if": "*",
      "is": ""
    }
  ],
  "shell": {
    "visibility": [
      {
        "if": "*",
        "is": true
      }
    ],
    "anchor": {
      "anchorId": [
        {
          "if": "*",
          "is": ""
        }
      ],
      "anchorKey": [
        {
          "if": "*",
          "is": ""
        }
      ]
    },
    "pointerEvents": [
      {
        "if": "*",
        "is": "auto"
      }
    ]
  },
  "content": {
    "playback": {
      "loop": [
        {
          "if": "*",
          "is": true
        }
      ],
      "autoplay": [
        {
          "if": "*",
          "is": true
        }
      ],
      "speed": [
        {
          "if": "*",
          "is": 1
        }
      ],
      "scrollStart": [
        {
          "if": "*",
          "is": "middle"
        }
      ]
    }
  },
  "layout": {
    "frame": {
      "fit": [
        {
          "if": "*",
          "is": "contain"
        }
      ],
      "aspectRatio": [
        {
          "if": "*",
          "is": "auto"
        }
      ]
    }
  }
}