This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
Live time and progress
time is HTML's instant, in epoch milliseconds. format names the platform
presentation: relative, timer, countdown, date-short, date-medium
(the default), date-long, date-full, or time-short and time-medium (with seconds). Date and time styles use the viewer's locale and
time zone (Linux desktop currently uses English). Children are fallback text if the host cannot format the instant.
contract
component Clock
view
column
time datetime=1792209600000 format="relative"
text "Departure"
time datetime=1792209600000 format="countdown"
progress start=1792209000000 end=1792209600000 aria-label="Trip"
Relative time changes at minute boundaries, timers and countdowns each second.
A timer counts elapsed or remaining time on either side of its instant; a
countdown stops at zero. The runner drives them without an app task, including
under the agent's clock +60000. A standalone live time reserves its box
at its font: two localized units for relative time, one extra hour digit
for a timer, and the first displayed shape for a countdown. Apple timers use
SwiftUI’s first field (0:05, 1:00:00). A live time inside a text with other runs reflows as on the web;
make it its own text node when its width must stay fixed. Changing numeric
text uses tabular digits by default.
progress start=… end=… advances from zero to one over the interval and
clamps outside it. Supply both instants with end after start, without
value or max. The existing forms remain: progress value=0.4 max=1 is
a determinate bar, and progress is the platform activity indicator. A
progress control takes no children; aria-label names it.
A development Apple build with widgets, made with --widget-gallery or
EXACT_WIDGET_GALLERY=1, has Widgets… in its dev menu (Develop on macOS). It shows every declared family in full colour, accented and
vibrant modes, light and dark, at large and XXXL text sizes. It uses the entry's
headless plan and the extension's snapshot driver. In-process containers and
mode presentation are stand-ins; archive fidelity needs the real extension.
Agent address | Reads |
|---|---|
bun scripts/agent.mjs ios widget next-trains --family systemMedium --mode accented --scheme dark --size xxxl tree "screenshot target/widget.png" state | Snapshot tree, the entry alone, and its props |
bun scripts/agent.mjs macos widget next-trains tree state | First declared family, full colour, light, large text |
bun scripts/agent.mjs ios widget next-trains --epoch 2026-08-28T09:05:00Z "clock +600000" tree state | Refresh and render at the app’s advanced clock |
| bun scripts/agent.mjs ios widget next-trains --configuration '{"rows":"one"}' "screenshot target/one.png" state | A configured widget's refresh and render with that choice; state reports the configuration and the props its refresh returned |
A configured widget's cells render its defaults, then each other value of each
enum parameter (the rest at their defaults) in full colour, light and dark;
--configuration <json> names parameters and values over the defaults, and a name or
value the configuration does not declare is refused with the ones it does. An
entity parameter takes any entry's id, as --configuration '{"book":"<id>"}':
the gallery reads no published list. Each cell's refresh receives the values it
renders.
An immediate refresh answer supplies its first timeline entry. Pending, empty
or unavailable data keeps the preview; state reports which. The gallery's
refresh reads none of the app's saved data and sends no requests, so a widget
whose refresh reads storage shows what it shows with none; every read of a
refreshed preview says so (storage). Check such a widget with --props, or
on a Home Screen, where the extension reads both. --props <json>
replaces the preview props for this read and takes precedence over refresh. Widget
reads accept only tree, screenshot <png>, state and the app’s clock; film,
window, compare and --scale options are refused. Ordinary builds name the
--widget-gallery rebuild. Production builds include no gallery code.
Is this helpful
Last updated November 30, 2026