Skip to main content

ScrollView

Overview

A container that makes content scrollable when it overflows the screen. For example, use it on a detail page built from several sections.

Properties

PropertyDescriptionValueDefault
scrollDirectionSets the axis (horizontal or vertical) content scrolls along.horizontal, verticalvertical
reverseFlips the scroll start position to the opposite end.On/offOff
paddingSets the inner padding around the content. When it isn't set, no padding is applied.Padding valueNot set
controllerConnects a controller that drives the scroll position. It's ignored when scroll areas are nested and share the default controller.ControllerNot set
primarySets whether to attach to the default scroll controller. Sharing happens only when scroll areas are nested; elsewhere the view runs on its own controller.On/offOff
physicsSets how scrolling responds — momentum, boundary handling, and so on.bouncing, clamping, alwaysScrollable, rangeMaintaining, neverScrollable, pageNot set
dragStartBehaviorSets the criterion for detecting when a drag starts.down, startstart
clipBehaviorSets how content that overflows the area is clipped.none, hardEdge, antiAlias, antiAliasWithSaveLayerhardEdge
restorationIdSets the identifier used to save and restore the scroll position.StringNot set
keyboardDismissBehaviorSets whether the keyboard closes automatically while scrolling (dragging).manual, onDragmanual