div-action-scroll-by

Scrolls the container by item_count or offset starting from the current position. If both values are specified, the action will be combined. For scrolling back, use negative values.

Parameters

Parameters Description
id

string

Required parameter.

ID of the element where the action should be performed.

type

string

Required parameter.

The value must always be scroll_by.

animated

bool

Enables scrolling animation.

Default value: true.

duration

int

Scrolling animation duration in milliseconds. If omitted, the default platform scrolling behavior is used. A value of 0 means instant scrolling. Ignored when animated is false or animations are globally disabled.

Restriction for the value x: x >= 0.

item_count

int

Number of container elements to scroll through. For scrolling back, use negative values.

Default value: 0.

offset

int

Scrolling distance measured in dp from the current position. For scrolling back, use negative values. Only applies in gallery.

Default value: 0.

overflow

string

Defines navigation behavior at boundary elements:

  • clamp: Stop navigation at the boundary element (default)
  • ring: Navigate to the start or end, depending on the current element.
  • Possible values: clamp, ring.

    Default value: clamp.

    JSON
    {
      type*: "scroll_by",
      animated: "bool",
      duration: "int",
      id*: "string",
      item_count: "int",
      offset: "int",
      overflow: "string"
    }