Documentation
¶
Index ¶
- func ActivityTable(rows []view.ActivityRow) templ.Component
- func Breadcrumb(crumbs []view.Crumb, current string) templ.Component
- func CertificateTable(rows []view.CertRow, selectable bool, form string) templ.Component
- func Chart(c view.Chart) templ.Component
- func ChoiceRow(id, label string) templ.Component
- func CommandBar(label string) templ.Component
- func CommandGroup(label string) templ.Component
- func DevBanner() templ.Component
- func Fold(id, title string, open bool) templ.Component
- func FormRow(id, label, hint, errMsg string, required bool) templ.Component
- func KVList(rows []view.KV) templ.Component
- func MessageBar(m view.Message) templ.Component
- func Messages(list []view.Message) templ.Component
- func NumberRow(numbers []Number) templ.Component
- func Status(s view.Status, text string) templ.Component
- func Steps(steps []Step) templ.Component
- func Tabs(tabs []view.Tab) templ.Component
- type Number
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivityTable ¶
func ActivityTable(rows []view.ActivityRow) templ.Component
ActivityTable lists recent audit entries.
func Breadcrumb ¶
Breadcrumb renders the trail up to (not including) the current page.
func CertificateTable ¶
CertificateTable lists certificates. With selectable, every row gets a checkbox named "id" that belongs to the form with the given id, so command bar buttons can act on the selection without JavaScript.
func Chart ¶ added in v0.3.8
Chart renders a server-side SVG chart (docs/PHASE3.md D1) as a figure: a caption with a one-sentence summary, the SVG, and the same numbers as a table in a closed details element (the accessible version; color is never the only carrier).
All text goes through templ's escaping and is cleaned and clipped first (chart.go); the attributes are numbers or constants. This is the only component that writes an inline SVG, and it always writes the one tag shape the web tests allow: class="chart-svg" role="img" aria-labelledby=… viewBox=… and no other attribute. No style attribute, no script, no link, no image.
func ChoiceRow ¶
ChoiceRow lays out a group of radio buttons (the children) like a form row. A fieldset/legend can't take part in the row grid, so the group is labelled with role="radiogroup" and aria-labelledby instead.
func CommandBar ¶
CommandBar is the toolbar above a table; its children are CommandGroups.
func CommandGroup ¶
CommandGroup is one group of a command bar. Groups are separated by a line and always ordered: create | edit/transfer | dangerous (always last).
func Fold ¶ added in v0.3.8
Fold is a section that opens and closes: a native details element, no script, so the keyboard and screen readers work as they do everywhere. The summary holds the section heading (an h2), so the page keeps one heading per section. The state is not remembered (docs/PHASE3.md D12). The id is a constant of the calling page and must be unique on it.
func MessageBar ¶
MessageBar is a plain line with a text label ("Warning:", "Error:" …).
func Status ¶
Status renders a status as colored text with a small dot – never an icon, never a tinted background. The text carries the meaning; color only supports it.