components

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

templ: version: v0.3.1070

templ: version: v0.3.1070

Index

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(crumbs []view.Crumb, current string) templ.Component

Breadcrumb renders the trail up to (not including) the current page.

func CertificateTable

func CertificateTable(rows []view.CertRow, selectable bool, form string) templ.Component

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 ChoiceRow

func ChoiceRow(id, label string) templ.Component

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

func CommandBar(label string) templ.Component

CommandBar is the toolbar above a table; its children are CommandGroups.

func CommandGroup

func CommandGroup(label string) templ.Component

CommandGroup is one group of a command bar. Groups are separated by a line and always ordered: create | edit/transfer | dangerous (always last).

func DevBanner

func DevBanner() templ.Component

DevBanner is shown on every page while the server runs with --dev.

func FormRow

func FormRow(id, label, hint, errMsg string, required bool) templ.Component

FormRow lays out one labelled control (the children). errMsg marks the row invalid.

func KVList

func KVList(rows []view.KV) templ.Component

KVList renders a key/value list (certificate and CA details).

func MessageBar

func MessageBar(m view.Message) templ.Component

MessageBar is a plain line with a text label ("Warning:", "Error:" …).

func Messages

func Messages(list []view.Message) templ.Component

Messages renders a list of message bars.

func NumberRow

func NumberRow(numbers []Number) templ.Component

NumberRow shows overview figures in one plain line – no cards.

func Status

func Status(s view.Status, text string) templ.Component

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.

func Steps

func Steps(steps []Step) templ.Component

Steps renders the wizard progress as a numbered text line.

func Tabs

func Tabs(tabs []view.Tab) templ.Component

Tabs renders server-side tabs; each tab is its own URL.

Types

type Number

type Number struct {
	Label, Value, Href string
	Status             view.Status // "" = neutral; warn/crit color the figure
}

Number is one figure of a number row.

type Step

type Step struct {
	Label string
	State string // done | current | todo
}

Step is one step of a wizard.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL