ui

package
v1.2.6 Latest Latest
Warning

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

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

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

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 Card

func Card(p CardProps) templ.Component

func CoverageProgressBar

func CoverageProgressBar(pct int) templ.Component

func EmptyState

func EmptyState(p EmptyStateProps) templ.Component

func Field

func Field(id, labelKey string, required bool) 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

func FilterMine(checked bool, labelKey string) templ.Component

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

func FilterSelect(name, ariaLabel string) templ.Component

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

func FilterSubmit(labelKey string) templ.Component

FilterSubmit renders a submit button for non-live (submit-mode) filter bars.

func Flash

func Flash(flash, flashType string) templ.Component

func IconSVG

func IconSVG(name string, size int) templ.Component

func Input

func Input(p InputProps) templ.Component

func MetricCard

func MetricCard(label, value, sub, subColor, valueColor string) templ.Component

func ProgressBar

func ProgressBar(pct int, colorClass string) templ.Component

func ProgressBarThin

func ProgressBarThin(pct int, colorClass string) templ.Component

func Select

func Select(p SelectProps) templ.Component

func SortTh added in v1.2.5

func SortTh(label, col string, state SortState, action, target, formID string, class string) templ.Component

func StatusBadge

func StatusBadge(status string) templ.Component

func THead

func THead(p THeadProps) templ.Component

func Table

func Table(p TableProps) templ.Component

func Td

func Td(p TdProps) templ.Component

func Textarea

func Textarea(p TextareaProps) templ.Component

func Th

func Th(p ThProps) templ.Component

func Tr

func Tr(p TrProps) 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 InputProps struct {
	ID          string
	Name        string
	Type        string
	Placeholder string
	Value       string
	Required    bool
	Class       string
	Attrs       templ.Attributes
}

type SelectProps

type SelectProps struct {
	ID       string
	Name     string
	Required bool
	Class    string
	Attrs    templ.Attributes
}

type SortState added in v1.2.5

type SortState struct {
	Col string
	Dir string
}

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 TextareaProps struct {
	ID          string
	Name        string
	Placeholder string
	Value       string
	Required    bool
	Class       string
	Attrs       templ.Attributes
}

type ThProps

type ThProps struct {
	Attrs templ.Attributes
}

type TrProps

type TrProps struct {
	Attrs templ.Attributes
}

Directories

Path Synopsis
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020

Jump to

Keyboard shortcuts

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