1. Reference
  2. Layout

<figure>

A self-contained figure: a picture or chart grouped with its caption, as in HTML.

Layout
figure.ham
<figure style="w-full">
    <img src="https://hypeapps.dev/gallery/assets/dish.jpg"
         style="w-full h-200 rounded-xl"
         fit="cover"/>
    <figcaption style="muted text-sm mt-8">Grilled sea bass with lemon and herbs</figcaption>
</figure>
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
autoscroll-delay Autoscroll delay in seconds
number
0.0
autoscroll-loop Whether autoscroll loops
boolean
false
autoscroll-restart Autoscroll restart delay in seconds, or 'false' to disable
string
autoscroll-speed Autoscroll speed in pixels per second
number
autoscroll-target page: scroll the screen; self: scroll inside this box (give it a height). parent is accepted as self.
page, self
page
style Style classes
string

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.