Contents

Motion

The behavior whereby a component reacts to the motion of the person’s device.

Declaration

object Motion

Properties

NameTypeDescription
type Requiredstring

This behavior always has the type motion.

Mentioned in

Discussion

When you apply the Motion behavior to a component, the component reacts to the movement of the device. For example, when the user tilts the device, the component moves in the same direction. This video shows an example of the motion behavior.

Example

{
  "components": [
    {
      "role": "figure",
      "behavior": {
        "type": "motion"
      },
      "URL": "bundle://figure.jpg"
    }
  ]
}

See Also

Behaviors