presentationBackgroundInteraction
Choose whether the page behind a sheet can be used.
presentationBackgroundInteraction(interaction) applies to a view inside sheet content and decides whether the page behind the sheet can be tapped and scrolled. By default, a sheet dims the page behind it and blocks interaction.
import { List, Modifier, Text } from "onescript/views"
<List modifier={Modifier
.presentationDetents([{ height: 200 }, "medium", "large"])
.presentationBackgroundInteraction({ enabledUpThrough: "medium" })}>
<Text>Places nearby</Text>
</List>| Value | Behavior |
|---|---|
"automatic" | The system decides. This is the default. |
"disabled" | The page behind can't be used. |
"enabled" | The page behind can always be used, with no dimming. |
{ enabledUpThrough: PresentationDetent } | The page behind can be used while the sheet is at or below the given height; above it, dimming returns. |
How is this guide?
Last updated on