1. Reference
  2. Layout

<row>

Lays children side by side in one line; flex= shares the free space and align/cross position them.

Layout
row.ham
<row style="gap-12 items-center">
    <img src="https://hypeapps.dev/gallery/assets/person1.jpg"
         style="w-48 h-48 rounded-full"
         fit="cover"/>
    <column flex="1">
        <text style="font-semibold">Maya Chen</text>
        <text style="muted text-sm">Product designer</text>
    </column>
    <button style="bg-teal-600 text-white">Follow</button>
</row>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
align Main axis alignment
start, center, end, spaceBetween, spaceAround, spaceEvenly
start
cross Cross axis alignment; baseline lines the children up by their text baseline (items-baseline).
start, center, end, stretch, baseline
center
scroll x: the row scrolls sideways, as wide as its children (an hourly strip). The style token overflow-x-auto does the same; flex children keep their own width.
x
spacing Horizontal space between children
number
0

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

This page is also Markdown, and all of HAM is in llms.txt.