1. Reference
  2. Layout

<spacer>

Empty space: a fixed gap with size=, or a flexible spacer that pushes its neighbors apart.

Layout

This tag has more than one name. Every spelling is the same tag, so write whichever feels natural. Pick one and every example on this page uses it.

spacer.ham
<column style="w-full gap-0">
    <row style="w-full items-center">
        <text style="font-semibold">Order #4821</text>
        <spacer/>
        <text style="text-teal-600">Shipped</text>
    </row>
    <spacer size="24"/>
    <text style="muted">Arrives Friday, 14 November</text>
</column>
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
size Fixed height in pixels. If null, flexible Spacer expands to fill.
number

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.

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