presentationContentInteraction
Choose whether swiping in a sheet resizes it or scrolls its content.
presentationContentInteraction(behavior) applies to a view inside sheet content. When the sheet has more than one presentationDetents value and its content scrolls (such as a List or ScrollView), it decides whether a swipe up resizes the sheet first or scrolls the content first.
import { List, Modifier, Text } from "onescript/views"
<List modifier={Modifier
.presentationDetents(["medium", "large"])
.presentationContentInteraction("scrolls")}>
<Text>Content</Text>
</List>| Value | Behavior |
|---|---|
"automatic" | The system decides. This is the default. |
"resizes" | Expand the sheet to the next height before scrolling the content. |
"scrolls" | Scroll the content right away; resize only by dragging the indicator. |
How is this guide?
Last updated on