Contents

ParallaxScaleHeader

The scene that gives the impression of a parallax effect by zooming out and scrolling slightly more slowly than the person’s action.

Declaration

object ParallaxScaleHeader

Properties

NameTypeDescription
type Requiredstring

This scene always has the type parallax_scale.

Version 1.0

Mentioned in

Discussion

In the ParallaxScale scene, as the person scrolls down (away from the header), the background of the header component zooms out and scrolls slightly slower than the person, giving the impression of a parallax effect, as shown in this video.

You can use a parallax_scale scene with a section or chapter component that has a child header component. (The section or chapter component must contain a component with a role of header.)

Example

{
  "components": [
    {
      "role": "section",
      "scene": {
        "type": "parallax_scale"
      },
      "components": [
        {
          "role": "header",
          "style": {
            "fill": {
              "type": "image",
              "URL": "bundle://header.jpg",
              "fillMode": "cover",
              "verticalAlignment": "top",
              "horizontalAlignment": "center"
            }
          },
          "layout": {
            "minimumHeight": "75cw"
          },
          "components": [
            {
              "role": "title",
              "text": "Article Title",
              "textStyle": {
                "textAlignment": "center"
              }
            }
          ]
        }
      ]
    }
  ]
}

See Also

Scene Types