UILayouts
ScrollView
Scroll content vertically, horizontally, or in both directions.
ScrollView displays content in a scrollable region. It also accepts Modifiers.
import { Modifier, ScrollView, Text, VStack } from "onescript/views"
<ScrollView
showsIndicators={false}
modifier={Modifier.padding(12)}
>
<VStack
alignment="leading"
spacing={12}
>
{items.map(item => <Text key={item.id}>{item.title}</Text>)}
</VStack>
</ScrollView>| Prop | Type | Description |
|---|---|---|
axes | "vertical" | "horizontal" | "all" | Allowed scrolling directions. Defaults to "vertical". |
showsIndicators | boolean | Whether the system displays scroll indicators. Defaults to true. |
children | view or view array | Views placed in the scrollable content region. |
How is this guide?
Last updated on