Parameters
A single child component or an array of child components to make scrollable.
Configuration options for the scroll view.
A scrollable view that can contain other views.
ScrollView(children: Component): Component;
ScrollView(children: Component[]): Component;
ScrollView(props: { axis?: Axis, showsIndicators?: boolean }, children: Component[]): Component;
ScrollView([
Text("Long content that scrolls"),
Text("More content"),
Text("Even more content")
])
ScrollView({ axis: "horizontal" }, [
HStack({ spacing: 20 }, [
Rectangle().fill(Color("red")).frame({ width: 100, height: 100 }),
Rectangle().fill(Color("green")).frame({ width: 100, height: 100 }),
Rectangle().fill(Color("blue")).frame({ width: 100, height: 100 })
])
])
ScrollView({ showsIndicators: false }, [
VStack({ spacing: 16 }, [
Text("Content without scroll bars"),
Text("More content")
])
])