zstack
Layering: children share one grid cell. Paint order is DOM order.
Example
centered layer
badge
Basic usage
<m-zstack>
<img src="cover.jpg" alt="" />
<p style="place-self: center">Title</p>
</m-zstack>API
Attributes
| Name | Type/Values | Default | Description |
|---|---|---|---|
align | start · center · end · stretch | stretch | Aligns all layers on the block axis. |
justify | start · center · end · stretch | stretch | Aligns all layers on the inline axis. |
Content/markup contract
| Name | Type/Values | Default | Description |
|---|---|---|---|
| Children | layers in DOM order | — | Every child occupies the same grid cell; DOM order determines paint order. |
Notes
Defaults to stretch (fill layers are the web's common case; SwiftUI centers). Per-layer placement is plain place-self on the child — light DOM means the platform is the escape hatch.