UILayouts
ZStack
Layer child views on top of each other.
Layer child views in source order. Later children appear above earlier children. It also accepts Modifiers.
import { Image, Modifier, Text, ZStack } from "onescript/views"
const backgroundURL = new URL("https://example.com/background.png")
<ZStack alignment="bottomLeading">
<Image
url={backgroundURL}
resizable
modifier={Modifier.scaledToFill()}
/>
<Text modifier={Modifier.padding(12)}>Title</Text>
</ZStack>| Prop | Type | Description |
|---|---|---|
alignment | ZStackAlignment | Child alignment. Defaults to "center". |
children | view or view array | Child views layered from back to front. |
ZStackAlignment accepts "topLeading", "top", "topTrailing", "leading", "center", "trailing", "bottomLeading", "bottom", or "bottomTrailing".
How is this guide?
Last updated on