Tags and attributes
The vocabulary is closed: a tag outside this page is V001, and an attribute a tag does not list is V002. This page is generated from the same catalog the runtime validates against. A document without version accepts every tag and attribute below; the last two sections are what an older version="1" (or version="2") document leaves out. See The .tui language for what each tag does.
Every version
| Tag | Attributes |
|---|---|
<bind> | action keys to when |
<box> | border class disabled focusable gap height hidden id if on:click on:focus pad style title width |
<button> | border class disabled focusable gap height hidden id if label on:click on:focus pad style title width |
<col> | border class disabled focusable gap height hidden id if on:click on:focus pad style title width |
<input> | bind border class disabled focusable gap height hidden id if on:change on:click on:focus on:submit pad placeholder secret style title width |
<item> | border class disabled gap height hidden id if pad style title width |
<keymap> | — |
<list> | bind border class disabled each focusable gap height hidden id if key on:click on:focus on:select pad style title width |
<modal> | bind border class disabled focusable gap height hidden id if on:click on:close on:escape on:focus on:open open pad style title width |
<progress> | bind border class disabled focusable gap height hidden id if on:click on:focus pad style title value width |
<row> | border class disabled focusable gap height hidden id if on:click on:focus pad style title width |
<rule> | axis border class disabled focusable gap height hidden id if on:click on:focus pad style title width |
<screen> | class focus id style title |
<scroll> | axis border class disabled focusable gap height hidden id if on:click on:focus pad style title width |
<spacer> | border class disabled focusable gap height hidden id if on:click on:focus pad style title width |
<style> | src |
<text> | border class disabled focusable gap height hidden id if on:click on:focus pad style title width wrap |
<tui> | theme version |
Inside a list <item> nothing takes focus (the list does and navigates its rows): no input, button, list, or modal (V001), and no focusable, on:click, or on:focus (V002) anywhere in the row. Handle a row with the list's on:select, or a keymap row such as <bind keys="d" action="delete" when="#rows:focus"/> for <list id="rows"> (its event identifies the selected row).
Bindings contain no spaces: {path}, if="path", if="!path", and exactly one space on each side of as in each="path as alias".
Added by version="2"
Only in a <tui version="2"> document (V002 with (requires version="2") in a version="1" one): the additions to the tags above, and the full attribute sets of the new tags:
| Tag | Attributes |
|---|---|
<bind> | keycap label |
<box> | each key |
<col> | each key |
<column> | class id on:click style title width |
<hints> | border class disabled focusable gap height hidden id if on:click on:focus pad scope style title width |
<list> | checked mark on:change |
<row> | each key |
<sparkline> | bind border class disabled focusable gap height hidden id if max min on:click on:focus pad style title width |
<tab> | border class disabled focus gap hidden id if label pad short style title |
<table> | bind border checked class disabled each focusable gap height hidden id if key mark on:change on:click on:focus on:select pad placeholder style title width |
<tabs> | bind border class disabled focusable gap height hidden id if mark on:click on:focus on:select pad style title width |
<tui> | mouse |
iteminside atable: class only (plusclass:NAME)- every tag except
tui,style,keymap, andbind:class:NAME(the name is open and lowercase,[a-z_][a-z0-9_-]*; the value ispathor!path)
Added by version="3"
Only in a <tui version="3"> document (V002 with (requires version="3") in a version="1" or version="2" one): these attributes on top of the tags above (a tag itself unknown in an older version still gets only its own V001, with the version="2" hint, so an attribute on it — scale on sparkline, priority on column — reports nothing further there):
| Tag | Attributes |
|---|---|
<column> | priority |
<keymap> | when |
<modal> | focus |
<scroll> | stick |
<sparkline> | scale |