# <stack>

Layers its children on top of each other, each drawn over the last, like a caption over a photo.

Category: Layout.

```ham
<stack style="w-full h-220 rounded-xl">
    <img src="https://hypeapps.dev/gallery/assets/city.jpg"
         style="w-full h-220"
         fit="cover"/>
    <column style="w-full h-220 p-12 justify-end items-start">
        <block style="px-12 py-6 rounded-full bg-#00000099">
            <text style="text-white font-semibold">Lisbon, 18°</text>
        </block>
    </column>
</stack>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/stack-light.webp), [dark](https://hypeapps.dev/img/tags/stack-dark.webp).

## Attributes

| Name | What it does | Default |
|---|---|---|
| `clip` | false lets children paint outside the stack bounds. | `true` |

Any tag also takes gestures: `@on.tap`, `@on.longpress`, `@on.doubletap` and `@on.swipeleft` (and right, up and down). `@click` runs on a tap too.

## Guides and recipes that use it

- [Your first screen](https://hypeapps.dev/docs/guides/first-screen.md)
- [Navigation](https://hypeapps.dev/docs/guides/navigation.md)
- [Animations and effects](https://hypeapps.dev/docs/guides/animations.md)
- [Your own tags](https://hypeapps.dev/docs/guides/own-tags.md)

## Related tags

- [`<img>`](https://hypeapps.dev/docs/reference/img.md): Shows a picture from a URL or the app's files, sized and cropped by its style.
- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<block>`](https://hypeapps.dev/docs/reference/block.md): The general-purpose container: groups children and gives them padding, color, corners and a border.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<address>`](https://hypeapps.dev/docs/reference/address.md): Contact details as a block, in italic by default, as HTML's address element.
- [`<aside>`](https://hypeapps.dev/docs/reference/aside.md): A side note set apart from the main text, as HTML's aside element; it works like a block.
- [`<background>`](https://hypeapps.dev/docs/reference/background.md): The layer a swiped dismissible row reveals behind it, such as a red delete strip.
- [`<card>`](https://hypeapps.dev/docs/reference/card.md): A surface for grouped content, with padding, rounded corners and a soft shadow.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
