mica

Example

centered layer

badge

Basic usage

<m-zstack>
  <img src="cover.jpg" alt="" />
  <p style="place-self: center">Title</p>
</m-zstack>

API

Attributes

NameType/ValuesDefaultDescription
alignstart · center · end · stretchstretchAligns all layers on the block axis.
justifystart · center · end · stretchstretchAligns all layers on the inline axis.

Content/markup contract

NameType/ValuesDefaultDescription
Childrenlayers in DOM orderEvery 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.

← hstackcenter →