niso attributes
Checked against c430ebe on 2026-11-10. The files it covers are unchanged since.
niso adds four attributes, all data- attributes so a browser ignores them.
| Attribute | On | Meaning |
|---|---|---|
data-niso-surface="<name>" |
any element | The element is a surface: niso lays it out but never draws it in the page, and sends it to the named target as a template. Names: widget.small, widget.medium, activity, island.expanded, island.leading, island.trailing, island.minimal, carplay.list. |
data-timer-start="<ms>" |
<time>, <progress> in a surface |
Milliseconds since the Unix epoch. A <time> counts up from it; a <progress> fills from it. |
data-timer-end="<ms>" |
<time>, <progress> in a surface |
A <time> counts down to it; with data-timer-start, a <progress> is full at it. |
data-timer-period="<ms>" |
<progress> in a surface |
With data-timer-start, the progress bar fills every period and starts over. |
The timers are drawn by the platform (SwiftUI’s timer text, Android’s
Chronometer), so they keep counting in a widget whose page isn’t running.
The element’s text content is what shows when the timer is paused and in a
browser. How they work, and which targets take which names:
Surfaces.