Scroll View
A Scroll View is a container component equipped with scrolling capabilities.
If you are creating a list from an array of data, use one of the list-type components like List or Table instead.
Style Properties
Style properties allow you to customize the look and feel of the component. Combinations of styles applied to components can be saved as Stylesheets to easily reuse styles throughout your app. Styles can also be set dynamically using Variables. To learn more about all the different styling properties and how they work, take a look at Intro to Styling.
Component Specific Styles
Configuration Properties
Property | Description |
---|---|
Component Name | To alter the name of the component. The name is reflected in the Components tree. Defaults to Scroll View. |
Horizontal | Enable to position of the contents of the Scroll View into a row that will scroll horizontally. |
Show Horizontal Scroll Indicator | Enable to show a bar that shows the progress of scrolling through the Scroll View horizontally. |
Show Vertical Scroll Indicator | Enable to show a bar that shows the progress of scrolling through the Scroll View vertically. |
Bounce | Enable so that the contents of the Scroll View bounce when the user reaches the end of the Scroll View. |
Allow Touch Events | The default behavior of the Keyboard is to dismiss when a touch component (for example, a Button) is pressed. This default behavior is set by the value Never. Use the value Always when you want to continue to display the keyboard without dismissing the keyboard. In this scenario, to dismiss the keyboard after a touch component is pressed you will use the Dismiss Keyboard Action available on On Press trigger. |
Paging Enabled | When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. |
Snap to Interval | When set, causes the scroll view to stop at multiples of the value of the value (number) provided. This can be used for paginating through children that have lengths smaller than the scroll view. Typically used in combination with Snap to Alignment. Enabling this overrides Paging Enabled prop. |
Snap to Alignment | iOS Only. When set, will define the relationship of the snapping to the scroll view. Possible values:start will align the snap at the left (horizontal) or top (vertical).center will align the snap in the center.end will align the snap at the right (horizontal) or bottom (vertical). |
Data Properties
Property | Description |
---|---|
Scroll Enabled | When false, the view cannot be scrolled via touch interaction. |
Conditional Display
You can conditionally display a component based on a given condition. Learn more about conditionally displaying components in the Conditional Display doc.
Triggers
Actions for the On Scroll Trigger will have access to an event
prop that has the following shape (all values are numbers):
{
nativeEvent: {
contentInset: {bottom, left, right, top},
contentOffset: {x, y},
contentSize: {height, width},
layoutMeasurement: {height, width},
zoomScale
}
}
Updated about 1 month ago