Skip to main content

NestedScroll

The NestedScroll widget is a scroll container that links the header area and the body area so they scroll as one.
Use it for screens where the list below keeps scrolling while the header at the top collapses or stays pinned.

info

This widget is locked on the Free plan and available on the Pro and Enterprise plans.

Definition and role

The NestedScroll widget connects the outer scroll and the inner scroll into a single gesture. Children designated as header slivers go into the header area at the top, and the remaining children go into the body — so the body picks up scrolling once the header collapses.

  • Category: Layouts
  • Scroll direction: vertical (default) or horizontal
  • Supports pinned headers and floating headers

Features

FeatureDescription
Linked header and body scrollingHandles the outer header area and the inner body area as one continuous scroll.
Scroll directionSet vertical or horizontal with scrollDirection, and flip the direction with reverse.
Floating headerTurn on floatHeaderSlivers and the header appears immediately when you scroll back.
Scroll eventsRun actions when scrolling starts, updates, stops, and reaches the bottom.
Programmatic controlMove the scroll position to the top or the bottom from a script.

How to use

  1. Open the Layouts category in the left widget palette.
  2. Drag and drop the NestedScroll item onto the canvas.
  3. Place the children you want as the header and as the body inside it.
  4. In the property panel on the right, set the scroll behavior with scrollDirection, reverse, and the other properties.
  5. Attach actions to scroll events such as onStartScroll and onScrollEnd if needed.

Properties

PropertyDescriptionDefaultValue / type
scrollDirectionScroll directionVertical (vertical)horizontal, vertical
reverseFlips the scroll directionfalseTrue/false
floatHeaderSliversShows the header immediately when you scroll backfalseTrue/false
clipBehaviorHow content that overflows the area is clippedhardEdgenone, hardEdge, antiAlias, antiAliasWithSaveLayer
dragStartBehaviorThe point at which a drag scroll startsstartdown, start
restorationIdIdentifier used to restore the scroll positionNot setString

Notes and tips

tip

The header area and the body area are split by how you place the children. A child designated as a header sliver becomes the header at the top, and the remaining children are treated as the body.

warning

Nesting another NestedScroll inside a NestedScroll is not supported.

Learn more

tip

For the full set of Widget Controls (Property, Method, Event) that let you drive this widget from a script, visit NestedScroll Widget Control.