Products · Components

Stack

Layers what it holds on top of each other, such as a badge over a picture.

The first child sits at the bottom, and each child covers the whole stack. Place a child's content with justify and align on that child.

Children: Components

Example

The Stack component
view.dml
<Stack radius="large" aspect="16:9">
  <Image src="statics/photo.jpg" alt="A photo" fit="cover" />
  <View justify="end" padding="medium">
    <Badge tone="success">New</Badge>
  </View>
</Stack>

Props

PropTypeWhat it is
radiuscorner radius
widthfill, or a number of points
heightfill, or a number of points
aspectaspect ratio

Events

None.

Keep reading

On this page