1. Reference
  2. Metadata

<config>

App settings, not drawn itself: theme color, fonts, dark mode and the default look of each tag.

Metadata
config.ham
<column style="gap-12 w-full">
    <config default-card="w-full p-20 rounded-2xl bg-teal-50 dark:bg-teal-900"/>
    <card>
        <text style="font-bold">Pine Loop</text>
        <text style="muted">4 km · dry and open</text>
    </card>
    <card>
        <text style="font-bold">Lake Ridge</text>
        <text style="muted">9 km · muddy after rain</text>
    </card>
</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
ad_app_id
also ad-app-id
AdMob app id.
string
ad_app_open
also ad-app-open
App-open ad unit id.
string
ad_child_directed
also ad-child-directed
Treat requests as child-directed.
boolean
ad_collapsible
also ad-collapsible
Default collapsible banner placement.
top, bottom
ad_consent
also ad-consent
Ask for consent (UMP) before ads.
boolean
ad_content_rating
also ad-content-rating
The highest ad content rating.
G, PG, T, MA
ad_content_url
also ad-content-url
Default content URL for targeting.
url
ad_frequency
also ad-frequency
Show a full-screen ad at most every N requests.
number
ad_immersive
also ad-immersive
Full-screen ads in immersive mode.
boolean
ad_interstitial
also ad-interstitial
Interstitial ad unit id (ad:interstitial).
string
ad_keywords
also ad-keywords
Default targeting keywords.
string
ad_non_personalized
also ad-non-personalized
Request non-personalised ads.
boolean
ad_pacing
also ad-pacing
At least this long between full-screen ads: 30, 30s, 2m.
string
ad_rewarded
also ad-rewarded
Rewarded ad unit id (ad:rewarded).
string
ad_rewarded_interstitial
also ad-rewarded-interstitial
Rewarded interstitial ad unit id.
string
ad_test_devices
also ad-test-devices
Test device ids, space or comma separated.
string
ad_test_mode
also ad-test-mode
Google's test ads (debug builds use them anyway).
boolean
ad_under_age
also ad-under-age
Treat users as under the age of consent.
boolean
ad_user_id
also ad-user-id
Rewarded ads: server-side verification user id.
string
ad_verify
also ad-verify
Rewarded ads: server-side verification custom data.
string
app_id
also app-id
The app id HAM Sync shares databases under (sync="on"). Packaging stamps hype.toml's id, the same on every platform, so this is only for a server of your own.
string
app_key Application key
string
app_name The app's name in a shelf's home strip (default: its host).
string
app_store_id
also app-store-id
The App Store id, for review:store / rate:store.
string
auth_callback_scheme The URL scheme the browser login (auth:login) redirects back to (myapp://auth?code=…). Default hypeapps-auth, which the Hype Apps player answers; a store build registers the app's own.
string
auth_exchange_path GET {path}?code=… after the redirect: the server turns the one-time code into a session (cookies) and returns HAM, which is swapped into the target.
string
/auth/exchange
auth_login_path Login page opened in the browser, under the base URL.
string
/auth/login
auth_logout_path POSTed by auth:logout; the HAM it returns is swapped into the target.
string
/auth/logout
auth_token_path Device pairing: a myapp://pair?code=… link, or auth:pair:{code}, POSTs {"code"} here as JSON and stores the returned {"token"} as the bearer sent with every request.
string
/app/auth/token
badge_on_open
also badge-on-open
What opening the app does to the count on its icon: keep it (the app or its server sets it), or clear it when the app starts and each time the person returns. The tray is left alone either way.
keep, clear
keep
base_path
also base-path
Scope relative navigation and asset refs to this path for the app session (sticky; an empty value clears it).
string
base_path_sandbox
also base-path-sandbox
Deprecated: leading-slash paths also resolve within base_path. Leading-slash paths already stay under the app base.
boolean
bg_color Default background in the light theme (dark mode uses dark_bg_color).
color
cache_cleanup_interval Image cache: minutes between cleanups (int:60).
string
cache_max_age Image cache max age in days.
number
90
cache_max_size Image cache max total size in bytes.
number
1073741824
cache_medium_width Image cache: width of the medium rendition, px (int:600).
string
cache_small_width Image cache: width of the small rendition, px (int:200).
string
dark-mode Dark mode setting
dark, light, auto
auto
dark_bg_color
also dark-bg-color
Dark mode's page color (bg_color is the light one).
color
debug_reload
also debug-reload
Reload the document on a timer while developing: "every 10s", "500ms", "5000".
string
debug_warnings
also debug-warnings
Show the authoring-warnings badge and list (what HAM ignored, overflows …).
boolean
false
default_text_color Default text color for the app.
color
defaults Default style handling (none disables all framework defaults)
active, none
active
edge_scale
also edge-scale
On a round watch, page content scrolled into the top or bottom band the circle cuts (outside the round-safe square) shrinks and fades toward the edge, as Wear's lists do (to 70% and half opacity at the very edge), so nothing full-size is cut by the bezel. Each element up to half the screen tall scales as one, a list's rows each on their own. Square and full-bleed screens draw as is. false: everything is drawn full size.
boolean
true
feedback_diagnostics
also feedback-diagnostics
false: feedback mails leave out the app and device details.
boolean
true
feedback_email
also feedback-email
Where feedback: (and <feedback>) mails go when the statement names no recipient.
string
feedback_subject
also feedback-subject
The default feedback mail subject.
string
App feedback
font_cache_max_size Max size of the downloaded-fonts cache, bytes (int:20000000).
string
font_display How a screen waits for its fonts, as CSS font-display. block: the screen (the launch splash, or the previous screen) waits until the fonts it uses are in, up to font_timeout; a font later than that shows the fallback on this screen, with a warning, and is used from the next screen, never swapped in. swap: paint at once, swap each font in when it lands. optional: paint at once, use a font only from the next screen.
block, swap, optional
block
font_timeout How long, in ms, a screen waits for its fonts (font_display="block").
number
1500
font_urls Direct font URLs: "Family=https://…/font.ttf,Brand=https://…/brand.woff2".
string
forget_scope Shelf only: apps to erase (database, cookies, token, offline copies) when this config loads; space- or comma-separated URLs, or url#scope=key.
string
google_fonts Google Fonts to load ("Lato,Merriweather,Oswald:700").
string
home_button Shelf only: apps it opens get a round back button (solid ink, a white ring) there (the look of a portal's close control) instead of the strip. The app gets the band it takes as extra top inset, so its own app bar sits below it.
top-left, top-right
home_label Label of the strip back to the shelf ("My Apps").
string
Home
home_strip Shelf only: show the strip back to the shelf (default: true without home_button, false with it).
boolean
home_url A shelf's home: makes this document a shelf. Apps it opens with app: show a thin strip back (and a three-finger hold goes home) to the page they were opened from, with the portal that was open over it, else to home_url; only a shelf may forget apps or name scope keys. Only the launch document's config counts.
url
microsoft_store_id
also microsoft-store-id
The Microsoft Store id, for review:store on Windows.
string
orientation Lock the screen to portrait or landscape (honored on iOS/iPadOS and Android; desktop and web ignore it); all leaves it to the device.
portrait, landscape, all
all
performance Enable FrameMonitor performance diagnostics: overlay (or true), timing, all; false is off
timing, overlay, all, true, false
platform wear: watch mode (only <screen> → <main> renders, and a page opened with navigate: is a watch screen too: no app bar, black, round-safe; requests say X-Device-Platform: wear). A Wear OS watch is in watch mode without it.
wear
primary_color Primary theme color (default navy). Without it, dark mode draws the theme in the navy's light tone so default buttons, checked boxes and the selected tab stay readable; the primary token (bg-primary) stays the navy.
color
project Project name
string
App
ripple_amplitude
also ripple-amplitude
Screen ripple (tap_effect="ripple"): displacement, px.
number
14
ripple_chroma
also ripple-chroma
Screen ripple: color fringing (true, or a strength).
string
ripple_color
also ripple-color
Screen ripple: tint the waves (none: no tint).
color
ripple_damping
also ripple-damping
Screen ripple: how fast a wave dies away.
number
2.2
ripple_highlight
also ripple-highlight
Screen ripple: a light sheen on the crests, 0–1.
number
0
ripple_speed
also ripple-speed
Screen ripple: wave speed, px/s.
number
900
ripple_width
also ripple-width
Screen ripple: wavelength, px.
number
42
round_safe
also round-safe
On a round watch every screen keeps inside the circle: <main> is inset to the square the circle holds (about 15% of the width each side) and a short page sits in its middle; a square watch has no inset. false: full-bleed screens (a watch face). <screen round-safe> sets one screen.
boolean
true
selected_color
also nav_selected_color
The selected color of tabs and navigation items, app-wide.
color
server_url For an app run from files: the ONE server it talks to (https; http only for a local host). A /-rooted ref, or an https ref under this URL, is fetched from it; bare relative refs stay files; any other host is refused. Ignored, with a warning, in an app that is served.
url
show_ham HAM peek mode: longpress shows the HAM source on long press.
string
splash_animation
also splash-animation
The splash animation, played once over splash_color before the app fades in: a Lottie .json, a video (.mp4, .mov, .webm) or an image, by asset path or URL; a tap skips it, and under reduced motion it shows its last frame and goes straight on. One that can't load (offline, a bad file) goes straight on to the app; a debug build shows why.
string
splash_color
also splash-color
The splash's background color (#RRGGBB).
color
splash_duration
also splash-duration
How long the splash shows, ms.
number
splash_image
also splash-image, splash
The launch splash image.
url
status_bar
also status-bar
The app's status-bar icons: light (white, for dark pages), dark, or auto (from each screen's background). A <screen status_bar> overrides it.
light, dark, auto
auto
swipe_dismiss
also swipe-dismiss
On a watch every page goes back with a swipe from the left edge (Wear's swipe-to-dismiss: the page peels off the one under it; on the first page it leaves the app). false: no swipe, the system back only. <screen swipe-dismiss> sets one screen.
boolean
true
tag_body_max
also tag-body-max
The most elements one user tag instance may expand to; past it the instance warns and renders nothing.
number
2000
tag_depth
also tag-depth
How deep user tags may nest in one another; past it an instance warns and renders nothing.
number
8
tags App-wide user tag definitions, comma-separated: files of <tag> elements (file:/tags/ui.ham, https://…) or registry codes (hype:ABCDE, sandboxed; hype:ABCDE allow=globals grants more). Loaded once at start.
string
tags_max
also tags-max
The most user tag definitions an app may hold; later ones warn and are ignored.
number
200
tap_effect
also tap-effect
Global tap effect: ring, dot, burst or none, optionally with :color and :size (ring:blue:60); ripple adds the full-screen ripple (#fx), alone or with another ("ring ripple"). The ripple_* keys tune it.
string
none
tv_home
also tv-home
On a TV, the page the app opens instead of this one (relative to this document: tv_home="tv/" from /app/ opens /app/tv/). Read from the document's own <config>, so the TV home itself is not sent on; a reload of this document on a TV lands there again.
url
tv_safe_area On a TV the content keeps to the inner ~95% of the screen (overscan: a 5% safe-area inset, 48 pt each side and 27 pt top and bottom at 1080p), as inside a notch: the page background, fixed layers and bleed-* elements still run to the edges. false: no inset.
boolean
true
unselected_color
also nav_unselected_color
The unselected color of tabs and navigation items, app-wide.
color

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.