Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- func Badge(p BadgeProps) templ.Component
- func Button(p ButtonProps) templ.Component
- func Card(p CardProps) templ.Component
- func CoverageProgressBar(pct int) templ.Component
- func EmptyState(p EmptyStateProps) templ.Component
- func Field(id, labelKey string, required bool) templ.Component
- func FilterBar(p FilterBarProps) templ.Component
- func FilterMine(checked bool, labelKey string) templ.Component
- func FilterSearch(p FilterSearchProps) templ.Component
- func FilterSelect(name, ariaLabel string) templ.Component
- func FilterSubmit(labelKey string) templ.Component
- func Flash(flash, flashType string) templ.Component
- func IconSVG(name string, size int) templ.Component
- func Input(p InputProps) templ.Component
- func MetricCard(label, value, sub, subColor, valueColor string) templ.Component
- func ProgressBar(pct int, colorClass string) templ.Component
- func ProgressBarThin(pct int, colorClass string) templ.Component
- func Select(p SelectProps) templ.Component
- func SortTh(label, col string, state SortState, action, target, formID string, ...) templ.Component
- func StatusBadge(status string) templ.Component
- func THead(p THeadProps) templ.Component
- func Table(p TableProps) templ.Component
- func Td(p TdProps) templ.Component
- func Textarea(p TextareaProps) templ.Component
- func Th(p ThProps) templ.Component
- func Tr(p TrProps) templ.Component
- type BadgeProps
- type ButtonProps
- type CardProps
- type EmptyStateProps
- type FilterBarProps
- type FilterSearchProps
- type InputProps
- type SelectProps
- type SortState
- type THeadProps
- type TableProps
- type TdProps
- type TextareaProps
- type ThProps
- type TrProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Badge ¶
func Badge(p BadgeProps) templ.Component
func Button ¶
func Button(p ButtonProps) templ.Component
func CoverageProgressBar ¶
func EmptyState ¶
func EmptyState(p EmptyStateProps) templ.Component
func FilterBar ¶ added in v1.2.5
func FilterBar(p FilterBarProps) templ.Component
FilterBar renders a consistent list-filter form. Live mode (Target non-empty): HTMX-driven with hx-trigger="change" and an a11y announcement. Submit mode (Target empty): plain GET form; include FilterSubmit in children.
func FilterMine ¶ added in v1.2.5
FilterMine renders a "mine only" checkbox with consistent filter-bar styling.
func FilterSearch ¶ added in v1.2.5
func FilterSearch(p FilterSearchProps) templ.Component
FilterSearch renders a prominent text search input with a search icon. Debounced HTMX live-search fires on the input itself (300ms) when Action+Target are set. The enclosing FilterBar's hx-trigger intentionally excludes text inputs, so there's no double-fire.
func FilterSelect ¶ added in v1.2.5
FilterSelect renders a compact <select> for filter bars. w-auto overrides global/form styles that otherwise force selects to full width.
func FilterSubmit ¶ added in v1.2.5
FilterSubmit renders a submit button for non-live (submit-mode) filter bars.
func Input ¶
func Input(p InputProps) templ.Component
func MetricCard ¶
func Select ¶
func Select(p SelectProps) templ.Component
func StatusBadge ¶
func THead ¶
func THead(p THeadProps) templ.Component
func Table ¶
func Table(p TableProps) templ.Component
func Textarea ¶
func Textarea(p TextareaProps) templ.Component
Types ¶
type BadgeProps ¶
type BadgeProps struct {
Variant string
Class string
Attrs templ.Attributes
}
type ButtonProps ¶
type ButtonProps struct {
Variant string
Size string
Attrs templ.Attributes
}
type CardProps ¶
type CardProps struct {
Class string
Padding string
Accent string
Attrs templ.Attributes
}
type EmptyStateProps ¶
type EmptyStateProps struct {
TestID string
Class string
Attrs templ.Attributes
}
type FilterBarProps ¶ added in v1.2.5
type FilterBarProps struct {
ID string // form element ID; required when Target is set (used by hx-include)
Action string // GET endpoint, e.g. "/measures"
Target string // HTMX swap target, e.g. "#measures-table"; empty = plain-submit mode
Class string
}
FilterBarProps configures a list-filter form wrapper.
type FilterSearchProps ¶ added in v1.2.5
type FilterSearchProps struct {
ID string
Name string // query param name; defaults to "q"
Value string
Placeholder string // explicit placeholder; overridden by Columns if empty
Columns []string // locale keys of searchable columns, e.g. ["label_name","label_owner"]; generates placeholder
FormID string // bare ID of enclosing form (without #); used for hx-include
Action string // endpoint for HTMX live search on this input; empty = no HTMX
Target string // HTMX swap target; must be set together with Action
Class string // appended to the default filter control class + "pl-8 w-full"
}
FilterSearchProps configures the text search input in a filter bar.
type InputProps ¶
type SelectProps ¶
type THeadProps ¶
type THeadProps struct {
Attrs templ.Attributes
}
type TableProps ¶
type TableProps struct {
Attrs templ.Attributes
}
type TdProps ¶
type TdProps struct {
Attrs templ.Attributes
}
type TextareaProps ¶
type ThProps ¶
type ThProps struct {
Attrs templ.Attributes
}
type TrProps ¶
type TrProps struct {
Attrs templ.Attributes
}