# <center>

Centers its children and their lines of text, on both axes or only one.

Category: Layout.

```ham
<block style="w-full h-200 rounded-xl bg-gray-100 dark:bg-gray-800">
    <center>
        <icon name="check_circle teal size-48"/>
        <text style="font-bold mt-8">Payment received</text>
    </center>
</block>
```

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

## Attributes

| Name | What it does | Default |
|---|---|---|
| `horizontal` | true centers the horizontal axis (same presence rule as vertical). |  |
| `vertical` | true centers the vertical axis. Once vertical or horizontal is present, the other axis defaults to off. |  |

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.

## Related tags

- [`<block>`](https://hypeapps.dev/docs/reference/block.md): The general-purpose container: groups children and gives them padding, color, corners and a border.
- [`<icon>`](https://hypeapps.dev/docs/reference/icon.md): A Material Symbols icon, with its style, weight, size and color set in its name.
- [`<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.
- [`<col>`](https://hypeapps.dev/docs/reference/col.md): A box inside a row; its flex value sets its share of the row's width.

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