type Axis =
| "horizontal"
| "vertical"
| "both";
Values
The horizontal axis. Content flows or scrolls left to right (or right to left in RTL languages).
The vertical axis. Content flows or scrolls top to bottom.
Both horizontal and vertical axes. Content can scroll in both directions.
Usage
// Horizontal scrolling
ScrollView({ axis: "horizontal" }, [
HStack([
Text("Item 1"),
Text("Item 2"),
Text("Item 3")
])
])
// Vertical scrolling (default)
ScrollView({ axis: "vertical" }, [
VStack([
Text("Item 1"),
Text("Item 2"),
Text("Item 3")
])
])
// Both directions
ScrollView({ axis: "both" }, [
// Large content that can scroll horizontally and vertically
])