ZStack
COMPONENT

LAYOUT / ZSTACK

ZStack

Overlays child views along the depth axis (later children paint above earlier ones) — ideal for corner badges, background art under text, and custom overlays inside a Ring.

Signature#

SIGNATURE
<ZStack alignment="topTrailing">
  <Box width={108} height={68}
    background="theme.faint"
    cornerRadius={14} />
  <Badge text="LIVE"
    color="theme.success" />
</ZStack>
ZStack · topTrailing
LIVE

Props#

Inherits all StyleProps:

alignmentstringDefault "center"
Anchor alignment for overlaid children: "center", "top", "bottom", "leading", "trailing", or corners "topLeading", "topTrailing", "bottomLeading", "bottomTrailing".
zIndexnumberOptional
Placed on child elements — higher numbers paint above lower ones.

Example: Center Overlay on a Ring#

TSX
<ZStack alignment="center">
  <Ring value={82} size={96} lineWidth={9}
    color="theme.accent" />
  <VStack alignment="center" spacing={1}>
    <Text fontSize={22} fontWeight="bold">
      82%
    </Text>
    <Text fontSize={11}
      color="theme.secondary">Battery</Text>
  </VStack>
</ZStack>
Layered Ring + Text
82% Battery