# <config>

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

Category: Metadata.

```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>
```

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

## Attributes

| Name | What it does | Default |
|---|---|---|
| `ad_app_id` (also `ad-app-id`) | AdMob app id. |  |
| `ad_app_open` (also `ad-app-open`) | App-open ad unit id. |  |
| `ad_child_directed` (also `ad-child-directed`) | Treat requests as child-directed. |  |
| `ad_collapsible` (also `ad-collapsible`) | Default collapsible banner placement. (top, bottom) |  |
| `ad_consent` (also `ad-consent`) | Ask for consent (UMP) before ads. |  |
| `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. |  |
| `ad_frequency` (also `ad-frequency`) | Show a full-screen ad at most every N requests. |  |
| `ad_immersive` (also `ad-immersive`) | Full-screen ads in immersive mode. |  |
| `ad_interstitial` (also `ad-interstitial`) | Interstitial ad unit id (ad:interstitial). |  |
| `ad_keywords` (also `ad-keywords`) | Default targeting keywords. |  |
| `ad_non_personalized` (also `ad-non-personalized`) | Request non-personalised ads. |  |
| `ad_pacing` (also `ad-pacing`) | At least this long between full-screen ads: 30, 30s, 2m. |  |
| `ad_rewarded` (also `ad-rewarded`) | Rewarded ad unit id (ad:rewarded). |  |
| `ad_rewarded_interstitial` (also `ad-rewarded-interstitial`) | Rewarded interstitial ad unit id. |  |
| `ad_test_devices` (also `ad-test-devices`) | Test device ids, space or comma separated. |  |
| `ad_test_mode` (also `ad-test-mode`) | Google's test ads (debug builds use them anyway). |  |
| `ad_under_age` (also `ad-under-age`) | Treat users as under the age of consent. |  |
| `ad_user_id` (also `ad-user-id`) | Rewarded ads: server-side verification user id. |  |
| `ad_verify` (also `ad-verify`) | Rewarded ads: server-side verification custom data. |  |
| `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. |  |
| `app_key` | Application key |  |
| `app_name` | The app's name in a shelf's home strip (default: its host). |  |
| `app_store_id` (also `app-store-id`) | The App Store id, for review:store / rate:store. |  |
| `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. |  |
| `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. | `/auth/exchange` |
| `auth_login_path` | Login page opened in the browser, under the base URL. | `/auth/login` |
| `auth_logout_path` | POSTed by auth:logout; the HAM it returns is swapped into the target. | `/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. | `/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). |  |
| `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. |  |
| `bg_color` | Default background in the light theme (dark mode uses dark_bg_color). |  |
| `cache_cleanup_interval` | Image cache: minutes between cleanups (int:60). |  |
| `cache_max_age` | Image cache max age in days. | `90` |
| `cache_max_size` | Image cache max total size in bytes. | `1073741824` |
| `cache_medium_width` | Image cache: width of the medium rendition, px (int:600). |  |
| `cache_small_width` | Image cache: width of the small rendition, px (int:200). |  |
| `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). |  |
| `debug_reload` (also `debug-reload`) | Reload the document on a timer while developing: "every 10s", "500ms", "5000". |  |
| `debug_warnings` (also `debug-warnings`) | Show the authoring-warnings badge and list (what HAM ignored, overflows …). | `false` |
| `default_text_color` | Default text color for the app. |  |
| `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. | `true` |
| `feedback_diagnostics` (also `feedback-diagnostics`) | false: feedback mails leave out the app and device details. | `true` |
| `feedback_email` (also `feedback-email`) | Where feedback: (and <feedback>) mails go when the statement names no recipient. |  |
| `feedback_subject` (also `feedback-subject`) | The default feedback mail subject. | `App feedback` |
| `font_cache_max_size` | Max size of the downloaded-fonts cache, bytes (int:20000000). |  |
| `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"). | `1500` |
| `font_urls` | Direct font URLs: "Family=https://…/font.ttf,Brand=https://…/brand.woff2". |  |
| `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. |  |
| `google_fonts` | Google Fonts to load ("Lato,Merriweather,Oswald:700"). |  |
| `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"). | `Home` |
| `home_strip` | Shelf only: show the strip back to the shelf (default: true without home_button, false with it). |  |
| `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. |  |
| `microsoft_store_id` (also `microsoft-store-id`) | The Microsoft Store id, for review:store on Windows. |  |
| `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. |  |
| `project` | Project name | `App` |
| `ripple_amplitude` (also `ripple-amplitude`) | Screen ripple (tap_effect="ripple"): displacement, px. | `14` |
| `ripple_chroma` (also `ripple-chroma`) | Screen ripple: color fringing (true, or a strength). |  |
| `ripple_color` (also `ripple-color`) | Screen ripple: tint the waves (none: no tint). |  |
| `ripple_damping` (also `ripple-damping`) | Screen ripple: how fast a wave dies away. | `2.2` |
| `ripple_highlight` (also `ripple-highlight`) | Screen ripple: a light sheen on the crests, 0–1. | `0` |
| `ripple_speed` (also `ripple-speed`) | Screen ripple: wave speed, px/s. | `900` |
| `ripple_width` (also `ripple-width`) | Screen ripple: wavelength, px. | `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. | `true` |
| `selected_color` (also `nav_selected_color`) | The selected color of tabs and navigation items, app-wide. |  |
| `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. |  |
| `show_ham` | HAM peek mode: longpress shows the HAM source on long press. |  |
| `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. |  |
| `splash_color` (also `splash-color`) | The splash's background color (#RRGGBB). |  |
| `splash_duration` (also `splash-duration`) | How long the splash shows, ms. |  |
| `splash_image` (also `splash-image`, `splash`) | The launch splash image. |  |
| `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. | `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. | `2000` |
| `tag_depth` (also `tag-depth`) | How deep user tags may nest in one another; past it an instance warns and renders nothing. | `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. |  |
| `tags_max` (also `tags-max`) | The most user tag definitions an app may hold; later ones warn and are ignored. | `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. | `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. |  |
| `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. | `true` |
| `unselected_color` (also `nav_unselected_color`) | The unselected color of tabs and navigation items, app-wide. |  |

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

- [Your first screen](https://hypeapps.dev/docs/guides/first-screen.md)
- [Layout and styling](https://hypeapps.dev/docs/guides/layout.md)
- [Navigation](https://hypeapps.dev/docs/guides/navigation.md)
- [Forms and state](https://hypeapps.dev/docs/guides/forms.md)
- [Lists and loops](https://hypeapps.dev/docs/guides/lists.md)
- [Data and databases](https://hypeapps.dev/docs/guides/data.md)
- [A poll that syncs](https://hypeapps.dev/docs/guides/sync.md)
- [Who's using the app ($me)](https://hypeapps.dev/docs/guides/me.md)
- [Gestures](https://hypeapps.dev/docs/guides/gestures.md)
- [Animations and effects](https://hypeapps.dev/docs/guides/animations.md)
- [Drawing and media](https://hypeapps.dev/docs/guides/media.md)
- [Your own tags](https://hypeapps.dev/docs/guides/own-tags.md)
- [A seat picker](https://hypeapps.dev/docs/cookbook/seat-picker.md)
- [A cart with quantities](https://hypeapps.dev/docs/cookbook/cart.md)
- [A chat thread](https://hypeapps.dev/docs/cookbook/chat.md)
- [An hourly forecast](https://hypeapps.dev/docs/cookbook/forecast.md)
- [Rows the server updates (MoviePlz)](https://hypeapps.dev/docs/cookbook/movieplz-watchlist.md)
- [Pick the right match (MoviePlz)](https://hypeapps.dev/docs/cookbook/movieplz-match.md)
- [Search on the server (MoviePlz)](https://hypeapps.dev/docs/cookbook/movieplz-search.md)

## Related tags

- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<card>`](https://hypeapps.dev/docs/reference/card.md): A surface for grouped content, with padding, rounded corners and a soft shadow.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<globals>`](https://hypeapps.dev/docs/reference/globals.md): Declares app-wide variables, kept across pages and optionally saved on the device.
- [`<notification>`](https://hypeapps.dev/docs/reference/notification.md): Wires local and push notifications into the page: schedule one, and act when one is tapped.
- [`<shake>`](https://hypeapps.dev/docs/reference/shake.md): An invisible motion sensor that publishes live acceleration readings as $id variables.
- [`<state>`](https://hypeapps.dev/docs/reference/state.md): Declares a draw tool's own variables and starting values, read and written as $tool.* by its handlers.
- [`<styles>`](https://hypeapps.dev/docs/reference/styles.md): Declares named style aliases: each attribute becomes a style token that expands to its value.

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